/* Redaktionskalender base */

:root {
    --rk-bg: #f5f7fa;
    --rk-surface: #ffffff;
    --rk-surface-muted: #f1f4f8;
    --rk-surface-subtle: #fafbfc;
    --rk-border: #d9e1ea;
    --rk-border-soft: #e7edf3;
    --rk-text: #17202a;
    --rk-text-muted: #667085;
    --rk-text-soft: #98a2b3;
    --rk-primary: #003b64;
    --rk-primary-hover: #002f50;
    --rk-primary-soft: #eaf2ff;
    --rk-danger: #b42318;
    --rk-danger-soft: #fef3f2;
    --rk-warning: #b54708;
    --rk-warning-soft: #fffaeb;
    --rk-success: #067647;
    --rk-success-soft: #ecfdf3;
    --rk-info: #175cd3;
    --rk-info-soft: #eff8ff;
    --rk-purple: #6f42c1;
    --rk-orange: #fd7e14;
    --rk-radius-sm: 4px;
    --rk-radius-md: 8px;
    --rk-radius-lg: 12px;
    --rk-radius-xl: 16px;
    --rk-space-2xs: 2px;
    --rk-space-xs: 4px;
    --rk-space-sm: 8px;
    --rk-space-md: 16px;
    --rk-space-lg: 24px;
    --rk-space-xl: 32px;
    --rk-space-2xl: 48px;
    --rk-font-size-xs: 12px;
    --rk-font-size-sm: 13px;
    --rk-font-size-md: 14px;
    --rk-font-size-lg: 16px;
    --rk-font-size-xl: 20px;
    --rk-font-size-2xl: 24px;
    --rk-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --rk-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.10);
    --rk-shadow-lg: 0 14px 30px rgba(16, 24, 40, 0.14);
    --rk-focus-ring: 0 0 0 3px rgba(23, 92, 211, 0.20);
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    background: var(--rk-bg);
    color: var(--rk-text);
    font-size: var(--rk-font-size-md);
}

a {
    color: var(--rk-primary);
}

a:hover {
    color: var(--rk-primary-hover);
}

.rk-muted { color: var(--rk-text-muted); }
.rk-soft { color: var(--rk-text-soft); }
.rk-text-danger { color: var(--rk-danger); }
.rk-text-success { color: var(--rk-success); }
.rk-text-warning { color: var(--rk-warning); }
.rk-text-info { color: var(--rk-info); }

.rk-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rk-hidden { display: none !important; }

.rk-divider {
    height: 1px;
    background: var(--rk-border-soft);
    margin: var(--rk-space-md) 0;
}

/* Global status bar: Nu / Nästa */
.global-status-bar {
    width: 100%;
    min-height: 36px;
    background: rgba(248, 250, 252, 0.96);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.global-status-inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.86rem;
    line-height: 1.2;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
}

.global-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    flex: 0 0 auto;
}

.global-status-section {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.global-status-muted {
    color: #64748b;
    font-weight: 600;
}

.global-status-state,
.global-status-time {
    color: #111827;
    font-weight: 700;
}

.global-status-link {
    color: #1d4ed8;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-status-link:hover,
.global-status-link:focus {
    text-decoration: underline;
}

.global-status-divider {
    width: 1px;
    height: 18px;
    background: rgba(15, 23, 42, 0.14);
    flex: 0 0 auto;
}

@media (max-width: 700px) {
    .global-status-bar {
        min-height: 46px;
    }

    .global-status-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        white-space: normal;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .global-status-divider {
        display: none;
    }
}

/* Enhanced global status bar */
.global-status-bar {
    background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.10),
        inset 0 -1px 0 rgba(255, 255, 255, 0.85);
}

.global-status-inner {
    position: relative;
    min-height: 38px;
    border-left: 4px solid #2563eb;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.global-status-dot {
    animation: globalStatusPulse 2.4s ease-in-out infinite;
}

.global-status-now {
    padding-right: 2px;
}

.global-status-clock {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(37, 99, 235, 0.75);
    border-radius: 999px;
    position: relative;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.global-status-clock::before {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #2563eb;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.global-status-clock-hand {
    position: absolute;
    width: 2px;
    height: 6px;
    background: #2563eb;
    left: 50%;
    top: 3px;
    transform-origin: 50% 6px;
    transform: translateX(-50%);
    border-radius: 999px;
    animation: globalStatusClockTick 6s linear infinite;
}

.global-status-time {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: #0f172a;
}

@keyframes globalStatusPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.22);
        transform: scale(1.08);
    }
}

@keyframes globalStatusClockTick {
    from {
        transform: translateX(-50%) rotate(0deg);
    }
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-status-dot,
    .global-status-clock-hand {
        animation: none;
    }
}

/* Enhanced global status bar */
.global-status-bar {
    background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.10),
        inset 0 -1px 0 rgba(255, 255, 255, 0.85);
}

.global-status-inner {
    position: relative;
    min-height: 38px;
    border-left: 4px solid #2563eb;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.global-status-dot {
    animation: globalStatusPulse 2.4s ease-in-out infinite;
}

.global-status-now {
    padding-right: 2px;
}

.global-status-clock {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(37, 99, 235, 0.75);
    border-radius: 999px;
    position: relative;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.global-status-clock::before {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #2563eb;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.global-status-clock-hand {
    position: absolute;
    width: 2px;
    height: 6px;
    background: #2563eb;
    left: 50%;
    top: 3px;
    transform-origin: 50% 6px;
    transform: translateX(-50%);
    border-radius: 999px;
    animation: globalStatusClockTick 6s linear infinite;
}

.global-status-time {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: #0f172a;
}

@keyframes globalStatusPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.22);
        transform: scale(1.08);
    }
}

@keyframes globalStatusClockTick {
    from {
        transform: translateX(-50%) rotate(0deg);
    }
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-status-dot,
    .global-status-clock-hand {
        animation: none;
    }
}
