/* =========================================================
   1. DEVOTIONAL SAFFRON & ORANGE THEME VARIABLES
========================================================== */
:root {
    --saffron-primary: #e65100;
    --saffron-bright: #ff7a00;
    --saffron-deep: #9c2b00;
    --saffron-bg-soft: #fff8f0;
    --saffron-border: #f3d2b3;
    --gold-accent: #f59e0b;
    --shubh-green: #059669;
}

/* =========================================================
   2. DESKTOP STICKY LEFT SIDEBAR & MOBILE ARROW STRIP
========================================================== */
@media (min-width: 992px) {
    .muhurat-sticky-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 88px;
        z-index: 90;
        max-height: calc(100vh - 105px);
        overflow-y: auto;
        padding-right: 4px;
        scrollbar-width: thin;
        scrollbar-color: #f3d2b3 transparent;
    }
    .muhurat-sticky-sidebar::-webkit-scrollbar {
        width: 4px;
    }
    .muhurat-sticky-sidebar::-webkit-scrollbar-thumb {
        background: #e6a875;
        border-radius: 4px;
    }
}

.muhurat-sidebar-heading {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--saffron-deep);
    letter-spacing: 0.4px;
}

.muhurat-cat-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cat-scroll-arrow {
    display: none;
}

.muhurat-cat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.muhurat-cat-item {
    background: #ffffff;
    border: 1.5px solid var(--saffron-border);
    border-radius: 13px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 2px 8px rgba(180, 62, 0, 0.04);
    user-select: none;
}

.muhurat-cat-item:hover {
    border-color: var(--saffron-bright);
    background: #fffaf5;
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(230, 81, 0, 0.14);
}

.muhurat-cat-item.active {
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    border-color: #b83200;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(200, 62, 0, 0.28);
    transform: translateX(4px);
}

.muhurat-cat-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: var(--saffron-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    transition: all 0.22s ease;
}

.muhurat-cat-item.active .muhurat-cat-icon {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.muhurat-cat-name {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.25;
}

.muhurat-cat-sub {
    font-size: 12.5px;
    opacity: 0.85;
    display: block;
    margin-top: 1px;
}

/* Mobile & Tablet Horizontal Scroll + Arrow Buttons (< 992px) */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 0 !important;
    }
    .cat-scroll-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 50%;
        background: #ffffff;
        border: 1.5px solid var(--saffron-primary);
        color: var(--saffron-primary);
        font-size: 16px;
        box-shadow: 0 4px 12px rgba(230, 81, 0, 0.18);
        cursor: pointer;
        z-index: 5;
        transition: all 0.2s ease;
    }
    .cat-scroll-arrow:active {
        background: var(--saffron-primary);
        color: #ffffff;
    }
    .cat-scroll-arrow.left { margin-right: 6px; }
    .cat-scroll-arrow.right { margin-left: 6px; }

    .muhurat-cat-list {
        flex-direction: row;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 4px 2px 8px 2px;
        gap: 9px;
        scrollbar-width: none;
    }
    .muhurat-cat-list::-webkit-scrollbar {
        display: none;
    }
    .muhurat-cat-item {
        min-width: 158px;
        flex-shrink: 0;
        padding: 9px 12px;
    }
    .muhurat-cat-item:hover,
    .muhurat-cat-item.active {
        transform: translateY(-2px);
    }
    .muhurat-cat-sub {
        display: none;
    }
}

/* =========================================================
   3. RIGHT PANEL: DEVOTIONAL FORM CARD (Clear & Readable)
========================================================== */
.muhurat-panel-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid var(--saffron-border);
    box-shadow: 0 6px 22px rgba(180, 62, 0, 0.06);
}

.muhurat-panel-header {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d1 100%);
    border-bottom: 1.5px solid #fbd3ad;
    border-radius: 14px 14px 0 0;
}

.form-header-icon-box {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(200, 62, 0, 0.25);
}

#form-active-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #7c2d12;
}

#form-active-desc {
    font-size: 13.5px;
    color: #9a3412;
    font-weight: 500;
}

.muhurat-form-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #7c2d12;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.muhurat-form-control {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    height: 42px !important;
    border: 1.5px solid #e7c6a9 !important;
    border-radius: 10px !important;
    background-color: #fffdfb !important;
}

.muhurat-form-control:focus {
    border-color: var(--saffron-primary) !important;
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.15) !important;
    background-color: #ffffff !important;
}

.pac-container {
    z-index: 10000 !important;
}

.lang-pill-btn {
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    padding: 5px 14px;
    border: 1.5px solid var(--saffron-primary);
    transition: all 0.2s;
    cursor: pointer;
}
.lang-pill-btn.active {
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    color: #fff;
}
.lang-pill-btn:not(.active) {
    background-color: #fff;
    color: var(--saffron-primary);
}

/* =========================================================
   4. COMPACT & HIGH-CONTRAST VISUAL CALENDAR
========================================================== */
.muhurat-calendar-wrapper {
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid var(--saffron-border);
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(180, 62, 0, 0.06);
}

.cal-month-bar {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d1 100%);
    border-bottom: 1.5px solid #fbd3ad;
    padding: 11px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cal-month-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #7c2d12;
}

.cal-nav-btn {
    background: #ffffff;
    border: 1.5px solid #e6a875;
    color: var(--saffron-primary);
    border-radius: 8px;
    padding: 4px 11px;
    font-size: 15px;
    transition: all 0.2s;
}
.cal-nav-btn:hover {
    background: var(--saffron-primary);
    color: #ffffff;
}

.cal-weekdays-grid,
.cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-weekday {
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: #9a3412;
    background: #fffaf5;
    padding: 8px 2px;
    border-bottom: 1px solid #f3d2b3;
}

.cal-day-cell {
    min-height: 88px;
    border-right: 1px solid #f5ebe1;
    border-bottom: 1px solid #f5ebe1;
    padding: 5px 6px;
    position: relative;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cal-day-cell:nth-child(7n) { border-right: none; }
.cal-day-cell.empty { background: #fcfaf8; }

.cal-day-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.cal-day-num {
    font-size: 15.5px;
    font-weight: 800;
    color: #334155;
    line-height: 1;
}

.cal-day-week {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
}

/* Important Highlighted Auspicious Cells */
.cal-day-cell.quality-excellent {
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1.5px solid #059669;
    cursor: pointer;
}
.cal-day-cell.quality-excellent:hover {
    transform: translateY(-2px);
    z-index: 2;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.24);
}

.cal-day-cell.quality-good {
    background: #f0fdf4;
    border: 1.5px solid #22c55e;
    cursor: pointer;
}
.cal-day-cell.quality-good:hover {
    transform: translateY(-2px);
    z-index: 2;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.2);
}

.cal-day-cell.quality-acceptable {
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    cursor: pointer;
}
.cal-day-cell.quality-acceptable:hover {
    transform: translateY(-2px);
    z-index: 2;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.22);
}

.cal-info-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cal-info-line {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-rashi-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: #9a3412;
    background: rgba(255, 237, 213, 0.9);
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-score-pill {
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
    margin-top: 2px;
    letter-spacing: 0.2px;
}
.quality-excellent .cal-score-pill { background: #059669; }
.quality-good .cal-score-pill      { background: #16a34a; }
.quality-acceptable .cal-score-pill{ background: #d97706; }

/* =========================================================
   5. DETAILED MUHURAT TIMINGS CARDS (Prominent & Readable)
========================================================== */
.muhurat-detail-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid var(--saffron-border);
    border-left: 5px solid var(--shubh-green);
    padding: 15px 18px;
    box-shadow: 0 4px 14px rgba(180, 62, 0, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.muhurat-detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(230, 81, 0, 0.12);
}
.muhurat-detail-card.highlight-pulse {
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.45);
    transform: translateY(-3px);
}
.muhurat-detail-date {
    font-size: 16.5px;
    font-weight: 800;
    color: #7c2d12;
}
.muhurat-meta-tag {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 7px;
    display: inline-block;
    margin: 4px 5px 0 0;
}

/* =========================================================
   6. MOBILE & TABLET RESPONSIVE OPTIMIZATION
========================================================== */
@media (max-width: 767.98px) {
    #form-active-title { font-size: 1.15rem; }
    #form-active-desc  { font-size: 12.5px; }
    .cal-month-bar     { padding: 9px 10px; }
    #cal-month-title   { font-size: 1.05rem; }
    .cal-weekday       { font-size: 12px; padding: 7px 1px; }

    .cal-day-cell {
        min-height: 74px;
        padding: 4px 3px;
    }
    .cal-day-num { font-size: 13.5px; }
    .cal-day-week { display: none; }
    .cal-info-line { font-size: 9.5px; }
    .cal-rashi-tag { font-size: 9px; padding: 1px 2px; }
    .cal-score-pill { font-size: 8.5px; padding: 1px 2px; }
}
/* =========================================================
   MOBILE & TABLET BOTTOM APP MENU BAR + LEFT DRAWER (< 992px)
========================================================== */
.mobile-bottom-muhurat-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1.5px solid #fbd3ad;
    box-shadow: 0 -6px 22px rgba(156, 43, 0, 0.14);
    z-index: 1040;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.mobile-bottom-muhurat-nav.nav-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

.mobile-muhurat-tab {
    flex: 1;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 2px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
}
.mobile-muhurat-tab i {
    font-size: 15px;
    margin-bottom: 3px;
    width: 32px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.mobile-muhurat-tab.active,
.mobile-muhurat-tab:hover {
    color: #e65100;
}
.mobile-muhurat-tab.active i {
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(230, 81, 0, 0.28);
}

/* Left Slide Drawer Backdrop & Panel */
.muhurat-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.muhurat-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.muhurat-left-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 285px;
    max-width: 82vw;
    background: #fffdfb;
    z-index: 1055;
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.18);
}
.muhurat-left-drawer.open {
    transform: translateX(0);
}
.muhurat-drawer-header {
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    color: #ffffff;
    padding: 15px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.muhurat-drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}
.muhurat-drawer-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =========================================================
   ALL MUHURAT GRID MODAL (Mobile & Tablet)
========================================================== */
.muhurat-modal-content {
    border-radius: 18px;
    border: 1.5px solid #f3d2b3;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(156, 43, 0, 0.22);
}

.muhurat-modal-header {
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    color: #ffffff;
    border-bottom: none;
    padding: 14px 18px;
}

.muhurat-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.muhurat-modal-card {
    background: #ffffff;
    border: 1.5px solid #f3d2b3;
    border-radius: 13px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 3px 8px rgba(180, 62, 0, 0.04);
}

.muhurat-modal-card:hover,
.muhurat-modal-card.active {
    background: linear-gradient(135deg, #ff6b00 0%, #FF9800 100%);
    border-color: #b83200;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(200, 62, 0, 0.25);
}

.muhurat-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 7px;
    overflow: hidden;
}

.muhurat-modal-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.muhurat-modal-card.active .muhurat-modal-icon {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.muhurat-modal-title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
}