/**
 * Time Zone Converter App Styles
 *
 * A world-class time zone converter with glassmorphism design,
 * accessible, responsive interface
 */

/* ========================================
   Glassmorphism Variables
   ======================================== */

.time-zone-converter,
.tzc-container {
    /* Light mode: solid backgrounds for proper visibility */
    --glass-bg: #ffffff;
    --glass-bg-subtle: #f8fafc;
    --glass-border: #e2e8f0;
    --glass-blur: 16px;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-primary-hover: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-night: linear-gradient(135deg, #1e3a5f 0%, #2d1b4e 100%);
    --gradient-day: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --shadow-glass-hover: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Dark theme support - system preference (only when no explicit theme set) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .time-zone-converter,
    :root:not([data-theme]) .tzc-container {
        --glass-bg: #1e293b;
        --glass-bg-subtle: #334155;
        --glass-border: rgba(255, 255, 255, 0.15);
        --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        --shadow-glass-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    }
}

/* Manual theme toggle support */
[data-theme="dark"] .time-zone-converter,
[data-theme="dark"] .tzc-container {
    --glass-bg: #1e293b;
    --glass-bg-subtle: #334155;
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-glass-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* Dark mode contrast improvements */
[data-theme="dark"] .tzc-label,
[data-theme="dark"] .tzc-field label,
[data-theme="dark"] .tzc-section-title {
    color: #e2e8f0;
}

[data-theme="dark"] .tzc-hint {
    color: #94a3b8; /* Improved contrast for hint text */
}

[data-theme="dark"] .tzc-input::placeholder {
    color: #94a3b8; /* Placeholders can have lower contrast but still improved */
}

[data-theme="dark"] .tzc-recent h3,
[data-theme="dark"] .tzc-favorites h3 {
    color: #cbd5e1;
}

[data-theme="dark"] .tzc-world-clock-city {
    color: #e2e8f0;
}

[data-theme="dark"] .tzc-world-clock-date {
    color: #cbd5e1; /* Improved contrast: 6.5:1 on #334155 background */
}

[data-theme="dark"] .tzc-input {
    color: #f1f5f9;
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .tzc-input:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] .tzc-input:focus {
    background: rgba(51, 65, 85, 0.95);
}

[data-theme="dark"] .tzc-dst-badge--standard {
    background: rgba(148, 163, 184, 0.2);
    color: #b8c5d4; /* Lighter shade for dark mode to meet 4.5:1 contrast requirements */
}

/* System preference dark mode contrast improvements (only when no explicit theme set) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .tzc-label,
    :root:not([data-theme]) .tzc-field label,
    :root:not([data-theme]) .tzc-section-title {
        color: #e2e8f0;
    }

    :root:not([data-theme]) .tzc-hint {
        color: #94a3b8; /* Improved contrast for hint text */
    }

    :root:not([data-theme]) .tzc-input::placeholder {
        color: #94a3b8; /* Placeholders can have lower contrast but still improved */
    }

    :root:not([data-theme]) .tzc-recent h3,
    :root:not([data-theme]) .tzc-favorites h3 {
        color: #cbd5e1;
    }

    :root:not([data-theme]) .tzc-world-clock-city {
        color: #e2e8f0;
    }

    :root:not([data-theme]) .tzc-world-clock-date {
        color: #cbd5e1; /* Improved contrast: 6.5:1 on #334155 background */
    }

    :root:not([data-theme]) .tzc-input {
        color: #f1f5f9;
        background: rgba(51, 65, 85, 0.8);
        border-color: rgba(255, 255, 255, 0.2);
    }

    :root:not([data-theme]) .tzc-input:hover {
        background: rgba(51, 65, 85, 0.9);
        border-color: rgba(102, 126, 234, 0.4);
    }

    :root:not([data-theme]) .tzc-input:focus {
        background: rgba(51, 65, 85, 0.95);
    }
}

/* ========================================
   Light Mode Contrast Improvements
   Applied when user explicitly sets light theme
   ======================================== */

/* World Clock text - make times more readable (light mode only) */
[data-theme="light"] .tzc-world-clock-time {
    background: linear-gradient(135deg, #4f46e5 0%, #6b21a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* City names - darker for better readability (light mode only) */
[data-theme="light"] .tzc-world-clock-city {
    color: #334155;
}

/* Dates under cities - improve contrast (light mode only) */
[data-theme="light"] .tzc-world-clock-date {
    color: #64748b;
}

/* Labels - ensure good contrast (light mode only) */
[data-theme="light"] .tzc-label,
[data-theme="light"] .tzc-field label {
    color: #334155;
}

/* Hint text - improve readability (light mode only) */
[data-theme="light"] .tzc-hint {
    color: #64748b;
}

/* Section headings in quick access (light mode only) */
[data-theme="light"] .tzc-recent h3,
[data-theme="light"] .tzc-favorites h3 {
    color: #475569;
}

/* Input placeholder - visible but clearly placeholder (light mode only) */
[data-theme="light"] .tzc-input::placeholder {
    color: #94a3b8;
}

/* Result card time - make gradient more vibrant (light mode only) */
[data-theme="light"] .tzc-result-time {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Result card timezone name (light mode only) */
[data-theme="light"] .tzc-result-tz {
    color: #1e293b;
}

/* Result card date and offset (light mode only) */
[data-theme="light"] .tzc-result-date,
[data-theme="light"] .tzc-result-offset {
    color: #64748b;
}

/* Input fields - proper light mode styling */
[data-theme="light"] .tzc-input {
    color: #1e293b;
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .tzc-input:hover {
    background: #ffffff;
    border-color: #94a3b8;
}

[data-theme="light"] .tzc-input:focus {
    background: #ffffff;
    border-color: #667eea;
}

/* Section title styling for light mode */
[data-theme="light"] .tzc-section-title {
    color: #1e293b;
}

/* Force light mode glass variables when explicitly set */
[data-theme="light"] .time-zone-converter,
[data-theme="light"] .tzc-container {
    --glass-bg: #ffffff;
    --glass-bg-subtle: #f8fafc;
    --glass-border: #e2e8f0;
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --shadow-glass-hover: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

/* System preference light mode (no explicit theme) */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .tzc-world-clock-time {
        background: linear-gradient(135deg, #4f46e5 0%, #6b21a8 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }

    :root:not([data-theme]) .tzc-world-clock-city {
        color: #334155;
    }

    :root:not([data-theme]) .tzc-world-clock-date {
        color: #64748b;
    }

    :root:not([data-theme]) .tzc-label,
    :root:not([data-theme]) .tzc-field label {
        color: #334155;
    }

    :root:not([data-theme]) .tzc-hint {
        color: #64748b;
    }

    :root:not([data-theme]) .tzc-recent h3,
    :root:not([data-theme]) .tzc-favorites h3 {
        color: #475569;
    }

    :root:not([data-theme]) .tzc-input::placeholder {
        color: #94a3b8;
    }

    :root:not([data-theme]) .tzc-result-time {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }

    :root:not([data-theme]) .tzc-result-tz {
        color: #1e293b;
    }

    :root:not([data-theme]) .tzc-result-date,
    :root:not([data-theme]) .tzc-result-offset {
        color: #64748b;
    }

    :root:not([data-theme]) .tzc-input {
        color: #1e293b;
        background: #ffffff;
        border-color: #cbd5e1;
    }

    :root:not([data-theme]) .tzc-input:hover {
        background: #ffffff;
        border-color: #94a3b8;
    }

    :root:not([data-theme]) .tzc-input:focus {
        background: #ffffff;
        border-color: #667eea;
    }

    :root:not([data-theme]) .tzc-section-title {
        color: #1e293b;
    }
}

/* ========================================
   App Container
   ======================================== */

.tzc-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Time Zone Converter Main Container
   ======================================== */

.time-zone-converter {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    padding: var(--space-6);
    transition: box-shadow var(--transition-base);
}

.time-zone-converter:hover {
    box-shadow: var(--shadow-glass-hover);
}

/* ========================================
   Section Styles
   ======================================== */

.tzc-section-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.tzc-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.tzc-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

/* ========================================
   Prompt Section
   ======================================== */

.tzc-prompt-section {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.tzc-prompt-wrapper {
    display: flex;
    gap: var(--space-3);
}

.tzc-prompt-input {
    flex: 1;
}

/* ========================================
   Input Fields
   ======================================== */

.tzc-input {
    padding: var(--space-3);
    font-size: var(--font-size-base);
    font-family: inherit;
    color: var(--color-text);
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.tzc-input:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background: var(--glass-bg);
}

.tzc-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), var(--shadow-glow);
    background: var(--glass-bg);
}

.tzc-input::placeholder {
    color: var(--color-text-muted);
}

/* ========================================
   Buttons
   ======================================== */

.tzc-btn {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tzc-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tzc-btn-primary:hover {
    background: var(--gradient-primary-hover);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.tzc-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.tzc-btn-primary:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.tzc-btn-secondary {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-text);
    border: 1px solid var(--glass-border);
}

.tzc-btn-secondary:hover {
    background: var(--glass-bg);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.tzc-btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.tzc-btn-link {
    background: transparent;
    color: #4f46e5; /* Darker purple for better contrast - 5.9:1 on white */
    padding: var(--space-2);
    font-size: var(--font-size-sm);
}

.tzc-btn-link:hover {
    text-decoration: underline;
    color: #4338ca; /* Even darker on hover */
}

.tzc-btn-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
    border-radius: var(--radius-sm);
}

/* Dark mode link color - ensure contrast on dark backgrounds */
[data-theme="dark"] .tzc-btn-link {
    color: #a5b4fc; /* Light indigo for dark mode - good contrast on dark */
}

[data-theme="dark"] .tzc-btn-link:hover {
    color: #c7d2fe;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .tzc-btn-link {
        color: #a5b4fc;
    }

    :root:not([data-theme]) .tzc-btn-link:hover {
        color: #c7d2fe;
    }
}

/* ========================================
   Manual Selection Section
   ======================================== */

.tzc-manual-section {
    margin-bottom: var(--space-6);
}

.tzc-time-row {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    align-items: flex-end;
}

.tzc-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.tzc-field label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
}

.tzc-time-row .tzc-field {
    flex: 1;
}

.tzc-time-row .tzc-input {
    width: 100%;
}

/* ========================================
   Timezone Selection Row
   ======================================== */

.tzc-timezone-row {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.tzc-source-field,
.tzc-target-field {
    flex: 1;
}

.tzc-select-wrapper {
    position: relative;
}

.tzc-searchable-input {
    width: 100%;
}

/* Swap Button */
.tzc-swap-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: calc(var(--font-size-sm) + var(--space-4));
    flex-shrink: 0;
}

.tzc-swap-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.tzc-swap-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ========================================
   Dropdown Styles
   ======================================== */

.tzc-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-top: var(--space-1);
    list-style: none;
    padding: 0;
}

.tzc-dropdown[hidden] {
    display: none;
}

.tzc-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.tzc-dropdown-item:hover,
.tzc-dropdown-item--selected {
    background: var(--color-bg-alt);
}

.tzc-dropdown-city {
    font-weight: 500;
    color: var(--color-text);
}

.tzc-dropdown-offset {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ========================================
   Additional Targets (Chips)
   ======================================== */

.tzc-additional-targets {
    margin-top: var(--space-3);
}

.tzc-target-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.tzc-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
}

.tzc-chip-text {
    font-weight: 500;
}

.tzc-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    font-size: var(--font-size-sm);
    line-height: 1;
    transition: background var(--transition-fast);
}

.tzc-chip-remove:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Results Section
   ======================================== */

.tzc-results {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

.tzc-results[hidden] {
    display: none;
}

.tzc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.tzc-results-actions {
    display: flex;
    gap: var(--space-2);
}

.tzc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.tzc-result-card {
    position: relative;
    padding: var(--space-5);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-base);
    overflow: hidden;
}

.tzc-result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glass-hover);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Day/Night indicator bar at top of card */
.tzc-daynight-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-day);
    transition: background var(--transition-base);
}

.tzc-daynight-indicator--night {
    background: var(--gradient-night);
}

/* Day/Night icon */
.tzc-daynight-icon {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    font-size: var(--font-size-base);
    opacity: 0.7;
}

.tzc-result-time {
    font-size: 2.5rem;
    font-weight: 800;
    /* Use darker gradient colors for better contrast */
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
    line-height: 1.1;
}

.tzc-result-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.tzc-result-tz {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

.tzc-result-offset {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

/* DST Badge */
.tzc-dst-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-2);
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.tzc-dst-badge--standard {
    background: rgba(100, 116, 139, 0.15);
    color: #4b5563; /* Darker shade for 4.5:1 contrast ratio with background */
}

.tzc-day-diff {
    display: inline-block;
    margin-left: var(--space-2);
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

.tzc-day-next {
    background: var(--gradient-success);
    color: white;
}

.tzc-day-prev {
    background: var(--gradient-warning);
    color: white;
}

.tzc-favorite-btn {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.tzc-favorite-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
    transform: scale(1.1);
}

.tzc-favorite-btn--active {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

/* Copy button on result card */
.tzc-copy-btn {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    opacity: 0;
}

.tzc-result-card:hover .tzc-copy-btn {
    opacity: 1;
}

.tzc-copy-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* ========================================
   Meeting Planner Section
   ======================================== */

.tzc-meeting-planner {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

.tzc-meeting-planner[hidden] {
    display: none;
}

.tzc-meeting-intro {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
}

.tzc-timeline-container {
    overflow-x: auto;
    padding: var(--space-2);
    margin: calc(-1 * var(--space-2));
}

.tzc-timeline-header {
    margin-bottom: var(--space-2);
}

.tzc-timeline-hours {
    display: flex;
    padding-left: 120px;
}

.tzc-timeline-hour {
    flex: 1;
    min-width: 25px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-align: center;
}

.tzc-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.tzc-timeline-row {
    display: flex;
    align-items: center;
}

.tzc-timeline-label {
    width: 120px;
    flex-shrink: 0;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    padding-right: var(--space-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tzc-timeline-bar {
    display: flex;
    flex: 1;
    height: 28px;
    background: linear-gradient(90deg,
        rgba(100, 116, 139, 0.08) 0%,
        rgba(100, 116, 139, 0.05) 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tzc-timeline-block {
    flex: 1;
    min-width: 25px;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    transition: background var(--transition-fast);
}

.tzc-timeline-block:last-child {
    border-right: none;
}

.tzc-work-hour {
    background: linear-gradient(180deg,
        rgba(102, 126, 234, 0.35) 0%,
        rgba(102, 126, 234, 0.2) 100%);
}

.tzc-current-hour {
    background: var(--gradient-primary);
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.tzc-overlap-hour {
    background: var(--gradient-success);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: none;
    }
    50% {
        box-shadow: 0 0 12px rgba(17, 153, 142, 0.6);
    }
}

.tzc-overlap-info {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.tzc-overlap-success {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--gradient-success);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.tzc-overlap-line {
    margin-bottom: var(--space-2);
}

.tzc-overlap-line:last-child {
    margin-bottom: 0;
}

.tzc-overlap-none {
    color: var(--color-text-muted);
    font-style: italic;
}

/* ========================================
   Quick Access Section
   ======================================== */

.tzc-quick-access {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.tzc-recent h3,
.tzc-favorites h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.tzc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tzc-quick-chip {
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tzc-quick-chip:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.tzc-quick-chip--favorite {
    border-color: #fbbf24;
}

.tzc-empty-msg {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-style: italic;
}

.tzc-empty-msg[hidden] {
    display: none;
}

/* ========================================
   Use Cases Section
   ======================================== */

.use-cases {
    margin-top: var(--space-8);
    padding: var(--space-6);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.use-cases h2 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-3);
}

.use-cases-intro {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.use-cases-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-4);
}

.use-cases-list li {
    padding: var(--space-4);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
}

.use-cases-list strong {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-weight: 600;
}

.use-cases-list p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* ========================================
   Help Panel
   ======================================== */

.help-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.help-panel[hidden] {
    display: none;
}

.help-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-bg-card);
}

.help-header h2 {
    font-size: var(--font-size-lg);
    margin: 0;
}

.help-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
}

.help-close:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.help-close:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.help-body {
    padding: var(--space-6);
}

.help-section {
    margin-bottom: var(--space-6);
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.help-steps {
    margin: 0;
    padding-left: var(--space-5);
}

.help-steps li {
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.help-features {
    margin: 0;
    padding-left: var(--space-5);
}

.help-features li {
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ========================================
   Header Actions
   ======================================== */

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-icon:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .tzc-container {
        max-width: 100%;
    }

    .tzc-timezone-row {
        flex-direction: column;
        gap: var(--space-3);
    }

    .tzc-swap-btn {
        margin-top: 0;
        align-self: center;
        transform: rotate(90deg);
    }

    .tzc-quick-access {
        grid-template-columns: 1fr;
    }

    .tzc-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .time-zone-converter {
        padding: var(--space-4);
    }

    .tzc-prompt-wrapper {
        flex-direction: column;
    }

    .tzc-time-row {
        flex-direction: column;
        gap: var(--space-3);
    }

    .tzc-time-row .tzc-btn-secondary {
        width: 100%;
    }

    .tzc-timeline-label {
        width: 80px;
        font-size: var(--font-size-xs);
    }

    .tzc-timeline-hours {
        padding-left: 80px;
    }
}

/* ========================================
   RTL Support
   ======================================== */

[dir="rtl"] .tzc-dropdown-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .tzc-chip {
    flex-direction: row-reverse;
}

[dir="rtl"] .tzc-chip-remove {
    margin-left: 0;
    margin-right: var(--space-2);
}

[dir="rtl"] .use-cases-list li {
    border-left: none;
    border-right: 3px solid var(--color-primary);
}

[dir="rtl"] .tzc-timeline-label {
    padding-right: 0;
    padding-left: var(--space-2);
    text-align: right;
}

[dir="rtl"] .tzc-timeline-hours {
    padding-left: 0;
    padding-right: 120px;
}

[dir="rtl"] .tzc-favorite-btn {
    right: auto;
    left: var(--space-2);
}

/* ========================================
   Toast Notifications
   ======================================== */

.tzc-toast {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: var(--space-3) var(--space-5);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-glass);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tzc-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tzc-toast--success {
    background: var(--gradient-success);
    color: white;
    border-color: transparent;
}

.tzc-toast--error {
    background: var(--gradient-warning);
    color: white;
    border-color: transparent;
}

/* ========================================
   World Clock Section
   ======================================== */

.tzc-world-clock {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.tzc-world-clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.tzc-world-clock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
}

.tzc-world-clock-card {
    position: relative;
    padding: var(--space-4);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.tzc-world-clock-card:hover {
    background: var(--glass-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass);
}

.tzc-world-clock-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-day);
}

.tzc-world-clock-card--night::before {
    background: var(--gradient-night);
}

.tzc-world-clock-time {
    font-size: var(--font-size-xl);
    font-weight: 700;
    /* Use darker gradient colors for better light mode contrast */
    background: linear-gradient(135deg, #4f46e5 0%, #6b21a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-1);
}

.tzc-world-clock-city {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    font-weight: 500;
}

.tzc-world-clock-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.tzc-world-clock-empty {
    padding: var(--space-6);
    text-align: center;
    color: var(--color-text-muted);
}

/* ========================================
   Share Button
   ======================================== */

.tzc-share-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.tzc-share-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   DST Warning Banner
   ======================================== */

.tzc-dst-warning {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: #b45309;
}

.tzc-dst-warning svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .tzc-dst-warning {
        background: rgba(251, 191, 36, 0.15);
        color: #fbbf24;
    }
}

[data-theme="dark"] .tzc-dst-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* ========================================
   Onboarding / Empty State
   ======================================== */

.tzc-onboarding {
    padding: var(--space-8) var(--space-6);
    text-align: center;
}

.tzc-onboarding-icon {
    font-size: 4rem;
    margin-bottom: var(--space-4);
    filter: grayscale(0.3);
}

.tzc-onboarding h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.tzc-onboarding p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.tzc-onboarding-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
}

.tzc-suggestion {
    padding: var(--space-2) var(--space-4);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tzc-suggestion:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========================================
   Keyboard Shortcuts in Help
   ======================================== */

.help-shortcuts {
    display: grid;
    gap: var(--space-3);
    margin: 0;
}

.help-shortcuts dt {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-1);
}

.help-shortcuts dd {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.help-shortcuts kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 var(--space-2);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .tzc-result-card,
    .tzc-btn,
    .tzc-world-clock-card,
    .tzc-suggestion,
    .tzc-toast {
        transition: none;
    }

    .tzc-result-card:hover,
    .tzc-btn-primary:hover,
    .tzc-world-clock-card:hover,
    .tzc-suggestion:hover {
        transform: none;
    }

    .tzc-overlap-hour {
        animation: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .help-panel,
    .nav-actions,
    .tzc-prompt-section,
    .tzc-additional-targets,
    .tzc-quick-access,
    .tzc-world-clock,
    .tzc-toast {
        display: none;
    }

    .time-zone-converter {
        box-shadow: none;
        border: 1px solid #ccc;
        backdrop-filter: none;
    }
}
