/**
 * Sleep Calculator Stylesheet
 * 
 * Supports high-contrast Light and Dark mode rendering,
 * responsive mobile touch ergonomics, and ultradian cycle status visuals.
 */

.apple-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .apple-glass {
    background: rgba(18, 18, 20, 0.65);
}

.apple-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(228, 228, 231, 0.9);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dark .apple-card {
    background: rgba(24, 24, 27, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.apple-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 25px -10px rgba(99, 102, 241, 0.15);
}

.input-glass {
    background: rgba(244, 244, 245, 0.85);
    border: 1px solid rgba(212, 212, 216, 0.9);
    color: #18181b;
}

.dark .input-glass {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f4f4f5;
}

.input-glass:focus,
.input-glass:focus-within {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.tab-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: normal;
    word-break: normal;
    text-align: center;
    line-height: 1.25;
}

.tab-btn:hover {
    color: #18181b;
}

.dark .tab-btn:hover {
    color: #f4f4f5;
}

.tab-btn.active {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    color: #4f46e5;
    box-shadow: 0 2px 10px -2px rgba(99, 102, 241, 0.25);
}

.dark .tab-btn.active {
    background: #27272a;
    border-color: rgba(129, 140, 248, 0.4);
    color: #ffffff;
    box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.4);
}

/* Top Horizontal Presets */
.top-preset-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
}

.top-preset-btn:hover {
    transform: translateY(-1px);
}

.top-preset-btn.active-preset {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    color: #4338ca !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.dark .top-preset-btn.active-preset {
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: rgba(129, 140, 248, 0.6) !important;
    color: #a5b4fc !important;
}

/* Quick Time & Delay Chips */
.time-chip,
.delay-chip {
    transition: all 0.2s ease;
}

.time-chip:hover,
.delay-chip:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: #4338ca;
}

.dark .time-chip:hover,
.dark .delay-chip:hover {
    border-color: rgba(129, 140, 248, 0.4);
    color: #a5b4fc;
}

.time-chip.active-chip,
.delay-chip.active-delay {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    color: #4338ca !important;
    font-weight: 700;
}

.dark .time-chip.active-chip,
.dark .delay-chip.active-delay {
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: rgba(129, 140, 248, 0.6) !important;
    color: #a5b4fc !important;
    font-weight: 700;
}

/* High-Contrast Visible Scrollbar for results */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 9999px;
}

.dark .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background-color 0.2s ease;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(129, 140, 248, 0.45);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.75);
}

