/* ============================================
   RSL Time Picker Component
   Version: 1.0.0
   Description: Premium accessible time picker with
   single time and time range selection modes.
   Full ADA/WCAG 2.1 AA compliant with keyboard navigation,
   screen reader support, and live announcements.
   Features clock dial, quick presets, and natural typing.

   FilterBus Integration:
   - Publishes time selection to FilterBus for cross-component filtering
   - Use data-filterbus-publish="key" to enable publishing
   ============================================ */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Base colors */
    --rsl-tp-bg: #ffffff;
    --rsl-tp-bg-secondary: #f8fafc;
    --rsl-tp-border: #e2e8f0;
    --rsl-tp-border-focus: #6E7BFF;
    --rsl-tp-text: #1e293b;
    --rsl-tp-text-muted: #64748b;
    --rsl-tp-text-light: #94a3b8;

    /* Primary accent */
    --rsl-tp-primary: #6E7BFF;
    --rsl-tp-primary-hover: #5a67d8;
    --rsl-tp-primary-light: rgba(110, 123, 255, 0.1);
    --rsl-tp-primary-lighter: rgba(110, 123, 255, 0.05);

    /* Selection colors */
    --rsl-tp-selected-bg: #6E7BFF;
    --rsl-tp-selected-text: #ffffff;
    --rsl-tp-hover-bg: rgba(110, 123, 255, 0.1);

    /* Clock dial colors */
    --rsl-tp-dial-bg: #f8fafc;
    --rsl-tp-dial-border: #e2e8f0;
    --rsl-tp-dial-hand: #6E7BFF;
    --rsl-tp-dial-center: #6E7BFF;
    --rsl-tp-dial-number: #64748b;
    --rsl-tp-dial-number-active: #ffffff;
    --rsl-tp-dial-tick: #cbd5e1;

    /* Shadows */
    --rsl-tp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --rsl-tp-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -5px rgba(0, 0, 0, 0.04);
    --rsl-tp-shadow-focus: 0 0 0 3px rgba(110, 123, 255, 0.2);

    /* Dimensions */
    --rsl-tp-input-height: 44px;
    --rsl-tp-border-radius: 8px;
    --rsl-tp-border-radius-lg: 12px;
    --rsl-tp-popover-width: 280px;
    --rsl-tp-dial-size: 220px;

    /* Z-index */
    --rsl-tp-z-index: 1000;

    /* Animation timing */
    --rsl-tp-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --rsl-tp-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Container & Input Wrapper
   ============================================ */
.rsl-time-picker {
    position: relative;
    display: inline-block;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

.rsl-time-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Range mode: two inputs side by side */
.rsl-time-picker[data-mode="range"] .rsl-time-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rsl-time-picker-separator {
    color: var(--rsl-tp-text-muted);
    font-weight: 500;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

.rsl-time-picker-separator svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Input Field Group
   ============================================ */
.rsl-time-picker-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.rsl-time-picker-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rsl-tp-text);
}

.rsl-time-picker-label.required::after {
    content: " *";
    color: #ef4444;
}

.rsl-time-picker-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* ============================================
   Input Field
   ============================================ */
.rsl-time-picker-input {
    width: 100%;
    height: var(--rsl-tp-input-height);
    padding: 0.625rem 2.75rem 0.625rem 1rem;
    background: var(--rsl-tp-bg);
    border: 2px solid var(--rsl-tp-border);
    border-radius: var(--rsl-tp-border-radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--rsl-tp-text);
    cursor: pointer;
    transition: border-color var(--rsl-tp-transition),
                box-shadow var(--rsl-tp-transition),
                background-color var(--rsl-tp-transition);
}

.rsl-time-picker-input::placeholder {
    color: var(--rsl-tp-text-light);
}

.rsl-time-picker-input:hover:not(:disabled) {
    border-color: var(--rsl-tp-primary);
}

.rsl-time-picker-input:focus {
    outline: none;
    border-color: var(--rsl-tp-border-focus);
    box-shadow: var(--rsl-tp-shadow-focus);
}

.rsl-time-picker-input:disabled {
    background: var(--rsl-tp-bg-secondary);
    color: var(--rsl-tp-text-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.rsl-time-picker-input[readonly] {
    background: var(--rsl-tp-bg-secondary);
}

/* ============================================
   Icon Buttons
   ============================================ */
.rsl-time-picker-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--rsl-tp-text-muted);
    pointer-events: none;
    transition: color var(--rsl-tp-transition);
}

.rsl-time-picker-icon svg {
    width: 20px;
    height: 20px;
}

.rsl-time-picker-input:focus + .rsl-time-picker-icon,
.rsl-time-picker.open .rsl-time-picker-icon {
    color: var(--rsl-tp-primary);
}

/* Clear button */
.rsl-time-picker-clear {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: var(--rsl-tp-text-light);
    border: none;
    border-radius: 50%;
    color: var(--rsl-tp-bg);
    cursor: pointer;
    transition: background-color var(--rsl-tp-transition);
}

.rsl-time-picker-clear:hover {
    background: var(--rsl-tp-text-muted);
}

.rsl-time-picker-clear svg {
    width: 12px;
    height: 12px;
}

.rsl-time-picker.has-value .rsl-time-picker-clear {
    display: flex;
}

.rsl-time-picker.has-value .rsl-time-picker-input {
    padding-right: 4.5rem;
}

/* ============================================
   Popover Container
   ============================================ */
.rsl-time-picker-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: var(--rsl-tp-z-index);
    width: var(--rsl-tp-popover-width);
    background: var(--rsl-tp-bg);
    border: 1px solid var(--rsl-tp-border);
    border-radius: var(--rsl-tp-border-radius-lg);
    box-shadow: var(--rsl-tp-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--rsl-tp-transition),
                visibility var(--rsl-tp-transition),
                transform var(--rsl-tp-transition);
}

.rsl-time-picker-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Position above if near bottom of viewport */
.rsl-time-picker-popover.position-top {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(8px);
}

.rsl-time-picker-popover.position-top.open {
    transform: translateY(0);
}

/* Position left-aligned (right edge aligned with input) */
.rsl-time-picker-popover.position-left {
    /* left/right values set via JavaScript for precise positioning */
}

/* Combined positioning for top-left corner */
.rsl-time-picker-popover.position-top.position-left {
    /* Both classes work together - top handled by position-top, left by inline styles */
}

/* ============================================
   Popover Header
   ============================================ */
.rsl-time-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--rsl-tp-border);
    background: var(--rsl-tp-bg-secondary);
    border-radius: var(--rsl-tp-border-radius-lg) var(--rsl-tp-border-radius-lg) 0 0;
    position: relative;
}

/* Close button */
.rsl-time-picker-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--rsl-tp-text-muted);
    cursor: pointer;
    border-radius: var(--rsl-tp-border-radius);
    transition: background-color var(--rsl-tp-transition),
                color var(--rsl-tp-transition);
}

.rsl-time-picker-close:hover {
    background: var(--rsl-tp-hover-bg);
    color: var(--rsl-tp-text);
}

.rsl-time-picker-close:focus {
    outline: 2px solid var(--rsl-tp-primary);
    outline-offset: 2px;
}

.rsl-time-picker-close svg {
    width: 16px;
    height: 16px;
}

.rsl-time-picker-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 2rem;
    font-weight: 600;
    color: var(--rsl-tp-text);
    font-variant-numeric: tabular-nums;
}

.rsl-time-picker-display-segment {
    padding: 0.25rem 0.5rem;
    border-radius: var(--rsl-tp-border-radius);
    cursor: pointer;
    transition: background-color var(--rsl-tp-transition),
                color var(--rsl-tp-transition);
}

.rsl-time-picker-display-segment:hover {
    background: var(--rsl-tp-hover-bg);
}

.rsl-time-picker-display-segment:focus {
    outline: none;
    background: var(--rsl-tp-primary-light);
}

.rsl-time-picker-display-segment.active {
    background: var(--rsl-tp-selected-bg);
    color: var(--rsl-tp-selected-text);
}

.rsl-time-picker-display-colon {
    font-weight: 400;
    color: var(--rsl-tp-text-muted);
}

.rsl-time-picker-period {
    display: flex;
    flex-direction: column;
    margin-left: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.rsl-time-picker-period-btn {
    padding: 0.125rem 0.375rem;
    border: none;
    background: transparent;
    color: var(--rsl-tp-text-light);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color var(--rsl-tp-transition),
                color var(--rsl-tp-transition);
}

.rsl-time-picker-period-btn:hover {
    background: var(--rsl-tp-hover-bg);
    color: var(--rsl-tp-text);
}

.rsl-time-picker-period-btn:focus {
    outline: none;
    background: var(--rsl-tp-primary-light);
}

.rsl-time-picker-period-btn.active {
    background: var(--rsl-tp-selected-bg);
    color: var(--rsl-tp-selected-text);
}

/* ============================================
   Clock Dial
   ============================================ */
.rsl-time-picker-dial {
    position: relative;
    width: var(--rsl-tp-dial-size);
    height: var(--rsl-tp-dial-size);
    margin: 1rem auto;
    background: var(--rsl-tp-dial-bg);
    border: 2px solid var(--rsl-tp-dial-border);
    border-radius: 50%;
}

.rsl-time-picker-dial-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(var(--rsl-tp-dial-size) - 80px);
    height: calc(var(--rsl-tp-dial-size) - 80px);
    transform: translate(-50%, -50%);
    background: var(--rsl-tp-bg);
    border: 1px solid var(--rsl-tp-dial-border);
    border-radius: 50%;
    display: none; /* Show for 24-hour inner dial */
}

.rsl-time-picker-dial.show-inner .rsl-time-picker-dial-inner {
    display: block;
}

/* Clock hand */
.rsl-time-picker-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 2px;
    height: 80px;
    background: var(--rsl-tp-dial-hand);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.rsl-time-picker-hand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--rsl-tp-dial-hand);
    border-radius: 50%;
}

/* Center dot */
.rsl-time-picker-dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--rsl-tp-dial-center);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Clock numbers */
.rsl-time-picker-dial-number {
    position: absolute;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rsl-tp-dial-number);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--rsl-tp-transition),
                color var(--rsl-tp-transition),
                transform var(--rsl-tp-transition);
    user-select: none;
}

.rsl-time-picker-dial-number:hover {
    background: var(--rsl-tp-hover-bg);
    transform: scale(1.1);
}

.rsl-time-picker-dial-number:focus {
    outline: none;
    background: var(--rsl-tp-primary-light);
    box-shadow: var(--rsl-tp-shadow-focus);
}

.rsl-time-picker-dial-number.selected {
    background: var(--rsl-tp-selected-bg);
    color: var(--rsl-tp-dial-number-active);
    transform: scale(1.1);
}

.rsl-time-picker-dial-number.disabled {
    color: var(--rsl-tp-text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.rsl-time-picker-dial-number.disabled:hover {
    background: transparent;
    transform: none;
}

/* Inner dial numbers (for 24-hour mode) */
.rsl-time-picker-dial-number.inner {
    font-size: 0.75rem;
    width: 28px;
    height: 28px;
}

/* ============================================
   List Selector (Alternative to Dial)
   ============================================ */
.rsl-time-picker-lists {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    max-height: 280px;
}

.rsl-time-picker-list {
    flex: 1;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--rsl-tp-border) transparent;
}

.rsl-time-picker-list::-webkit-scrollbar {
    width: 6px;
}

.rsl-time-picker-list::-webkit-scrollbar-track {
    background: transparent;
}

.rsl-time-picker-list::-webkit-scrollbar-thumb {
    background: var(--rsl-tp-border);
    border-radius: 3px;
}

.rsl-time-picker-list-header {
    position: sticky;
    top: 0;
    padding: 0.5rem;
    background: var(--rsl-tp-bg);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rsl-tp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    border-bottom: 1px solid var(--rsl-tp-border);
}

.rsl-time-picker-list-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.9375rem;
    color: var(--rsl-tp-text);
    cursor: pointer;
    border-radius: var(--rsl-tp-border-radius);
    transition: background-color var(--rsl-tp-transition),
                color var(--rsl-tp-transition);
    font-variant-numeric: tabular-nums;
}

.rsl-time-picker-list-item:hover {
    background: var(--rsl-tp-hover-bg);
}

.rsl-time-picker-list-item:focus {
    outline: none;
    background: var(--rsl-tp-primary-light);
    box-shadow: inset var(--rsl-tp-shadow-focus);
}

.rsl-time-picker-list-item.selected {
    background: var(--rsl-tp-selected-bg);
    color: var(--rsl-tp-selected-text);
    font-weight: 600;
}

.rsl-time-picker-list-item.disabled {
    color: var(--rsl-tp-text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.rsl-time-picker-list-item.disabled:hover {
    background: transparent;
}

/* ============================================
   Quick Presets
   ============================================ */
.rsl-time-picker-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--rsl-tp-border);
    background: var(--rsl-tp-bg-secondary);
}

.rsl-time-picker-preset {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rsl-tp-text-muted);
    background: var(--rsl-tp-bg);
    border: 1px solid var(--rsl-tp-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--rsl-tp-transition);
}

.rsl-time-picker-preset:hover {
    background: var(--rsl-tp-hover-bg);
    border-color: var(--rsl-tp-primary);
    color: var(--rsl-tp-primary);
}

.rsl-time-picker-preset:focus {
    outline: none;
    box-shadow: var(--rsl-tp-shadow-focus);
    border-color: var(--rsl-tp-primary);
}

.rsl-time-picker-preset.active {
    background: var(--rsl-tp-primary);
    border-color: var(--rsl-tp-primary);
    color: var(--rsl-tp-selected-text);
}

/* ============================================
   Footer Actions
   ============================================ */
.rsl-time-picker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--rsl-tp-border);
    background: var(--rsl-tp-bg-secondary);
    border-radius: 0 0 var(--rsl-tp-border-radius-lg) var(--rsl-tp-border-radius-lg);
}

.rsl-time-picker-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--rsl-tp-border-radius);
    cursor: pointer;
    transition: all var(--rsl-tp-transition);
}

.rsl-time-picker-btn-cancel {
    background: transparent;
    border: 1px solid var(--rsl-tp-border);
    color: var(--rsl-tp-text-muted);
}

.rsl-time-picker-btn-cancel:hover {
    background: var(--rsl-tp-hover-bg);
    border-color: var(--rsl-tp-text-muted);
}

.rsl-time-picker-btn-confirm {
    background: var(--rsl-tp-primary);
    border: 1px solid var(--rsl-tp-primary);
    color: var(--rsl-tp-selected-text);
}

.rsl-time-picker-btn-confirm:hover {
    background: var(--rsl-tp-primary-hover);
    border-color: var(--rsl-tp-primary-hover);
}

.rsl-time-picker-btn:focus {
    outline: none;
    box-shadow: var(--rsl-tp-shadow-focus);
}

/* ============================================
   Inline Mode
   ============================================ */
.rsl-time-picker.inline .rsl-time-picker-input-group {
    display: none;
}

.rsl-time-picker.inline .rsl-time-picker-popover {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 2px solid var(--rsl-tp-border);
}

/* ============================================
   Screen Reader Only (Visually Hidden)
   ============================================ */
.rsl-time-picker-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Live region for announcements */
.rsl-time-picker-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Focus Visible States (High Contrast)
   ============================================ */
.rsl-time-picker-input:focus-visible {
    outline: 2px solid var(--rsl-tp-primary);
    outline-offset: 2px;
}

.rsl-time-picker-dial-number:focus-visible,
.rsl-time-picker-list-item:focus-visible,
.rsl-time-picker-preset:focus-visible,
.rsl-time-picker-btn:focus-visible,
.rsl-time-picker-period-btn:focus-visible,
.rsl-time-picker-display-segment:focus-visible {
    outline: 2px solid var(--rsl-tp-primary);
    outline-offset: 2px;
}

/* ============================================
   Dark Mode
   ============================================ */
[data-theme="dark"] {
    /* Neutral grey backgrounds to match other dark mode components */
    --rsl-tp-bg: #252525;
    --rsl-tp-bg-secondary: #1e1e1e;
    --rsl-tp-border: #3a3a3a;
    --rsl-tp-border-focus: #64b5f6;
    --rsl-tp-text: #e0e0e0;
    --rsl-tp-text-muted: #9e9e9e;
    --rsl-tp-text-light: #757575;

    /* Neutral accent colors */
    --rsl-tp-primary: #64b5f6;
    --rsl-tp-primary-hover: #42a5f5;
    --rsl-tp-primary-light: rgba(100, 181, 246, 0.15);
    --rsl-tp-primary-lighter: rgba(100, 181, 246, 0.08);

    /* Selection uses subtle highlight */
    --rsl-tp-selected-bg: #1976d2;
    --rsl-tp-selected-text: #ffffff;
    --rsl-tp-hover-bg: rgba(255, 255, 255, 0.08);

    /* Clock dial - neutral dark */
    --rsl-tp-dial-bg: #1e1e1e;
    --rsl-tp-dial-border: #3a3a3a;
    --rsl-tp-dial-hand: #64b5f6;
    --rsl-tp-dial-center: #64b5f6;
    --rsl-tp-dial-number: #9e9e9e;
    --rsl-tp-dial-tick: #4a4a4a;

    --rsl-tp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --rsl-tp-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -5px rgba(0, 0, 0, 0.3);
    --rsl-tp-shadow-focus: 0 0 0 3px rgba(100, 181, 246, 0.3);
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .rsl-time-picker-popover,
    .rsl-time-picker-hand,
    .rsl-time-picker-dial-number,
    .rsl-time-picker-list-item,
    .rsl-time-picker-preset,
    .rsl-time-picker-btn,
    .rsl-time-picker-input,
    .rsl-time-picker-icon {
        transition: none;
    }

    .rsl-time-picker-hand {
        transition: transform 0.1s linear;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    .rsl-time-picker-popover {
        width: calc(100vw - 2rem);
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
    }

    .rsl-time-picker-popover.open {
        transform: translateX(-50%) translateY(0);
    }

    .rsl-time-picker-dial {
        --rsl-tp-dial-size: 200px;
    }

    .rsl-time-picker-display {
        font-size: 1.75rem;
    }
}

/* ============================================
   FilterBus Integration Visual Indicator
   ============================================ */
.rsl-time-picker[data-filterbus-publish] .rsl-time-picker-input {
    border-left: 3px solid var(--rsl-tp-primary);
    padding-left: calc(1rem - 1px);
}

.rsl-time-picker[data-filterbus-publish].has-value .rsl-time-picker-input {
    border-left-color: #10b981;
}

/* ============================================
   Range Mode Specific Styles
   ============================================ */
.rsl-time-picker[data-mode="range"] .rsl-time-picker-popover {
    width: calc(var(--rsl-tp-popover-width) * 1.5);
}

.rsl-time-picker-range-header {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--rsl-tp-border);
}

.rsl-time-picker-range-section {
    flex: 1;
    text-align: center;
}

.rsl-time-picker-range-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rsl-tp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.rsl-time-picker-range-section.active {
    position: relative;
}

.rsl-time-picker-range-section.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rsl-tp-primary);
}
