/**
 * Navratri 2026 Colours & Festival Calendar Styles
 * EasyToolio - Date & Time Tools Suite
 * Full Light & Dark Theme Support, Zero Horizontal Overflow Guarantee
 */

:root {
    --nav-gold: #F59E0B;
    --nav-gold-glow: rgba(245, 158, 11, 0.25);
    --nav-saffron: #EA580C;
    --nav-red: #DC2626;
    --nav-glass-bg: rgba(18, 18, 24, 0.72);
    --nav-glass-border: rgba(255, 255, 255, 0.08);
}

/* Ambient Sacred Theme Container */
.navratri-theme-container {
    position: relative;
    background: radial-gradient(circle at 50% 0%, rgba(234, 88, 12, 0.12) 0%, rgba(126, 34, 206, 0.05) 45%, transparent 75%);
    overflow-x: clip;
    max-width: 100vw;
}

/* Glassmorphic Festival Cards (Dark default) */
.nav-card-glass {
    background: rgba(24, 24, 32, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-card-glass:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 12px 30px -10px rgba(245, 158, 11, 0.15);
}

/* Active Day Card Glowing Border (Grid / Div cards only) */
.nav-card-active:not(tr) {
    background: linear-gradient(135deg, rgba(30, 27, 46, 0.85) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 0 35px -5px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.nav-card-active:not(tr)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #EA580C, #F59E0B, #EAB308, #16A34A, #1D4ED8, #7E22CE);
    background-size: 200% auto;
    animation: sacredShimmer 4s linear infinite;
}

/* Specific overrides for Table Rows to eliminate pseudo-element horizontal bar and box-shadow overflow bleed */
tr.nav-card-active {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    position: static !important;
    overflow: visible !important;
}

tr.nav-card-active::before {
    display: none !important;
    content: none !important;
}

tr.nav-card-active > td {
    background-color: rgba(245, 158, 11, 0.08) !important;
    border-top: 1px solid rgba(245, 158, 11, 0.3) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3) !important;
}

tr.nav-card-active > td:first-child {
    border-left: 3.5px solid #F59E0B !important;
}

tr.nav-card-active > td:last-child {
    border-right: 1px solid rgba(245, 158, 11, 0.3) !important;
}

@keyframes sacredShimmer {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* Sacred Swatch Circle */
.nav-swatch-circle {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-swatch-circle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Diya / Puja Glow Indicator */
.nav-diya-glow {
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
    animation: diyaPulse 2.8s ease-in-out infinite;
}

@keyframes diyaPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.85));
    }
}

/* Countdown Digit Box */
.nav-countdown-box {
    background: rgba(10, 10, 15, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.75rem 0.5rem;
    min-width: 64px;
    text-align: center;
    backdrop-filter: blur(8px);
}

/* Day Selector Pill */
.nav-day-tab {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.nav-day-tab.is-selected {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    color: #FCD34D;
}

/* Shareable Card Canvas Preview */
.nav-canvas-preview-wrap {
    background: radial-gradient(circle at 50% 50%, rgba(30, 30, 45, 0.8) 0%, rgba(15, 15, 22, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

#navratriShareCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Copy Toast Badge */
.nav-copy-badge {
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.nav-copy-badge.is-visible {
    opacity: 1;
    transform: translateY(-4px);
}

/* Clean, Minimal Scrollbar */
.nav-horizontal-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
}

.nav-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
    background: transparent;
}

.nav-horizontal-scroll::-webkit-scrollbar-track {
    background: transparent;
    border: none;
}

.nav-horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 9999px;
}

.nav-horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}

html.dark .nav-horizontal-scroll {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

html.dark .nav-horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

html.dark .nav-horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ========================================================
   LIGHT THEME ADAPTATIONS (html:not(.dark))
   ======================================================== */
html:not(.dark) .navratri-theme-container {
    background: radial-gradient(circle at 50% 0%, rgba(234, 88, 12, 0.08) 0%, rgba(245, 158, 11, 0.04) 45%, transparent 75%);
    color: #1e293b;
}

html:not(.dark) .nav-card-glass,
html.light .nav-card-glass {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) .nav-card-glass:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.12);
}

html:not(.dark) .nav-card-active:not(tr) {
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.95) 0%, rgba(254, 243, 199, 0.85) 100%) !important;
    border: 1.5px solid rgba(217, 119, 6, 0.7) !important;
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* Light Theme Active Table Row - Clean Amber Wash with No Bleed */
html:not(.dark) tr.nav-card-active {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

html:not(.dark) tr.nav-card-active::before {
    display: none !important;
    content: none !important;
}

html:not(.dark) tr.nav-card-active > td {
    background-color: #FFFDF5 !important;
    border-top: 1px solid #FDE68A !important;
    border-bottom: 1px solid #FDE68A !important;
    color: #0f172a !important;
}

html:not(.dark) tr.nav-card-active > td:first-child {
    border-left: 3.5px solid #F59E0B !important;
}

html:not(.dark) tr.nav-card-active > td:last-child {
    border-right: 1px solid #FDE68A !important;
}

html:not(.dark) tr.nav-card-active .text-white,
html:not(.dark) tr.nav-card-active .text-zinc-200,
html:not(.dark) tr.nav-card-active .text-zinc-300,
html:not(.dark) tr.nav-card-active .group-hover\:text-amber-300 {
    color: #0f172a !important;
}

html:not(.dark) tr.nav-card-active .text-amber-400,
html:not(.dark) tr.nav-card-active .text-amber-500 {
    color: #b45309 !important;
}

/* Sticky First Column (Day Column) for Smooth Table Scrolling */
.nav-sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #121218;
}

html:not(.dark) .nav-sticky-col,
html.light .nav-sticky-col {
    background-color: #ffffff !important;
}

tr.nav-card-active > td.nav-sticky-col {
    background-color: #1e1b24 !important;
}

html:not(.dark) tr.nav-card-active > td.nav-sticky-col,
html.light tr.nav-card-active > td.nav-sticky-col {
    background-color: #FFFDF5 !important;
}

.nav-sticky-col-header {
    position: sticky;
    left: 0;
    z-index: 20;
    background-color: #181820;
}

html:not(.dark) .nav-sticky-col-header,
html.light .nav-sticky-col-header {
    background-color: #f8fafc !important;
}

/* Shadow divider on sticky column */
.nav-sticky-divider {
    box-shadow: 4px 0 8px -3px rgba(0, 0, 0, 0.4);
}

html:not(.dark) .nav-sticky-divider,
html.light .nav-sticky-divider {
    box-shadow: 4px 0 8px -3px rgba(0, 0, 0, 0.08);
}

/* White Swatch Circle Border for Contrast */
.nav-swatch-white {
    border: 2px solid #94a3b8 !important;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.2) !important;
}

/* Quick Day-by-Day Jump Pills */
.nav-day-pill {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.nav-day-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 158, 11, 0.5);
}

.nav-day-pill.is-selected {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(234, 88, 12, 0.2) 100%) !important;
    border-color: #F59E0B !important;
    color: #FCD34D !important;
    box-shadow: 0 4px 14px -2px rgba(245, 158, 11, 0.35);
}

html:not(.dark) .nav-day-pill.is-selected,
html.light .nav-day-pill.is-selected {
    background: #FEF3C7 !important;
    border-color: #D97706 !important;
    color: #92400e !important;
    box-shadow: 0 4px 14px -2px rgba(217, 119, 6, 0.25);
}

/* View Switcher Toggle Buttons */
.view-mode-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: #a1a1aa;
}

.view-mode-btn:hover {
    color: #ffffff;
}

.view-mode-btn.is-active {
    background: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

html:not(.dark) .view-mode-btn {
    color: #64748b !important;
}

html:not(.dark) .view-mode-btn:hover {
    color: #0f172a !important;
}

html:not(.dark) .view-mode-btn.is-active {
    background: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%) !important;
    color: #000000 !important;
    font-weight: 800 !important;
}

/* Festival Edition Tab Switcher Buttons */
.edition-tab-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(39, 39, 42, 0.85);
    color: #e4e4e7 !important;
}

.edition-tab-btn:hover {
    background-color: rgba(63, 63, 70, 0.95) !important;
    color: #ffffff !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

.edition-tab-btn.is-active {
    background: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 14px -2px rgba(245, 158, 11, 0.4);
}

.edition-tab-btn.is-active:hover {
    background: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%) !important;
    color: #000000 !important;
}

/* Light Mode Overrides for Edition Tab Buttons */
html:not(.dark) .edition-tab-btn {
    background-color: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .edition-tab-btn:hover {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #f59e0b !important;
}

html:not(.dark) .edition-tab-btn.is-active {
    background: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%) !important;
    color: #000000 !important;
    border-color: #d97706 !important;
    font-weight: 800 !important;
}

html:not(.dark) .navratri-theme-container .text-white {
    color: #0f172a !important;
}

html:not(.dark) .navratri-theme-container .text-zinc-200 {
    color: #1e293b !important;
}

html:not(.dark) .navratri-theme-container .text-zinc-300 {
    color: #334155 !important;
}

html:not(.dark) .navratri-theme-container .text-zinc-400 {
    color: #64748b !important;
}

html:not(.dark) .navratri-theme-container .text-zinc-500 {
    color: #64748b !important;
}

html:not(.dark) .nav-countdown-box {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .nav-countdown-box span.text-amber-400 {
    color: #d97706 !important;
}

html:not(.dark) .navratri-theme-container .bg-black\/40,
html:not(.dark) .navratri-theme-container .bg-black\/30 {
    background-color: rgba(248, 250, 252, 0.9) !important;
    border-color: rgba(226, 232, 240, 0.95) !important;
}

html:not(.dark) .navratri-theme-container .bg-zinc-900\/60,
html:not(.dark) .navratri-theme-container .bg-zinc-900\/80,
html:not(.dark) .navratri-theme-container .bg-zinc-950\/40 {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(226, 232, 240, 0.95) !important;
}

html:not(.dark) .navratri-theme-container .bg-zinc-800,
html:not(.dark) .navratri-theme-container .bg-zinc-800\/80 {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .btn-copy-hex {
    background-color: #f1f5f9 !important;
    color: #b45309 !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .btn-copy-hex:hover {
    background-color: #e2e8f0 !important;
}

html:not(.dark) tr[data-nav-day]:hover {
    background-color: rgba(254, 243, 199, 0.4) !important;
}

html:not(.dark) .nav-canvas-preview-wrap {
    background: radial-gradient(circle at 50% 50%, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Print Optimization */
@media print {
    .nav-card-glass, .nav-card-active {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important;
        box-shadow: none !important;
    }
    .no-print {
        display: none !important;
    }
}
