/* ════════════════════════════════════════════════════════════════
   TRADITIONAL PANCHANG POSTER CALENDAR
   ════════════════════════════════════════════════════════════════ */

.cal-poster-section {
    background: #f5f0e1 !important;
}

.trad-calendar-board {
    background: #fffbe6;
    border: 3px solid #b71c1c;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(183, 28, 28, 0.18);
    overflow: hidden;
    width: 100%;
    font-family: 'Noto Sans Devanagari', 'Outfit', sans-serif;
}

.trad-calendar-board.is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    border-radius: 0;
    border: none;
    overflow-y: auto;
    background: #fffbe6;
}

/* ── HEADER ── */
.trad-cal-header {
    background: linear-gradient(180deg, #ffd600 0%, #ffca28 50%, #ffb300 100%);
    border-bottom: 3px solid #b71c1c;
    padding: 10px 16px;
}

.trad-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.trad-samvat-box {
    flex: 1;
    min-width: 160px;
}

.trad-samvat-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 0.95rem;
    font-weight: 900;
    color: #b71c1c;
    line-height: 1.2;
}

.trad-samvat-range {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1a237e;
    line-height: 1.2;
}

.trad-month-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trad-hindi-month-name {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 2rem;
    font-weight: 900;
    color: #b71c1c;
    line-height: 1;
    letter-spacing: 1px;
}

.trad-year-pill {
    background: #b71c1c;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    padding: 2px 14px;
    border-radius: 8px;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.3);
}

.trad-header-right {
    flex: 1;
    text-align: right;
    min-width: 140px;
}

.trad-english-month {
    font-family: 'Cinzel', 'Marcellus', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #1a237e;
    letter-spacing: 2px;
    line-height: 1;
}

.trad-hdr-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trad-hdr-btn {
    height: 28px;
    padding: 0 8px;
    border-radius: 5px;
    background: #b71c1c;
    color: #fff;
    font-weight: 800;
    font-size: 0.7rem;
    border: 1px solid #ffd600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.trad-hdr-btn:hover {
    background: #1a237e;
    color: #ffd600;
}

.trad-hdr-btn.btn-today {
    background: #1a237e;
    color: #ffd600;
}

.trad-hdr-datepicker input {
    height: 28px;
    border-radius: 5px;
    border: 1px solid #b71c1c;
    padding: 0 6px;
    font-weight: 700;
    font-size: 0.72rem;
    color: #1a237e;
    background: #fff;
}

/* ── GRID TABLE ── */
.trad-table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 2px;
    background: #fff8e1;
}

.trad-grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1px;
    table-layout: fixed;
}

.trad-grid-table td {
    vertical-align: top;
    padding: 0 !important;
    font-size: inherit;
    border: none;
}

.trad-weekday-label-cell {
    width: 72px;
    vertical-align: middle !important;
}

.trad-grid-data-cell {
    width: calc((100% - 72px) / var(--week-cols, 5));
}

/* ── DAY PILLS ── */
.trad-day-pill {
    background: linear-gradient(135deg, #ffd600, #ff8f00);
    color: #b71c1c;
    border: 2px solid #b71c1c;
    border-radius: 12px;
    min-height: 82px;
    padding: 8px 6px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.trad-day-pill.sunday {
    background: linear-gradient(135deg, #ef5350, #b71c1c);
    color: #fff;
    border-color: #880e4f;
}

.trad-day-pill .hi-day {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 0.9rem;
    font-weight: 900;
    display: block;
    line-height: 1;
    white-space: nowrap;
}

.trad-day-pill .en-day {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: block;
    opacity: 0.9;
    line-height: 1;
}

.trad-day-pill.sunday .en-day {
    color: #ffcdd2;
}

/* ── DATE CELLS ── */
.trad-date-cell {
    position: relative;
    width: 100%;
    min-height: 82px;
    height: 82px;
    background: #ffffff;
    border: 2px solid #d4a574;
    border-radius: 8px;
    padding: 2px;
    cursor: pointer;
    transition: all 0.15s;
    box-sizing: border-box;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    grid-template-columns: 1fr auto;
    gap: 0;
}

.trad-date-cell:hover {
    background: #fff8e1;
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.trad-date-cell.today-cell {
    background: #fff8e1;
    border-color: #f59e0b;
    box-shadow: inset 0 0 0 2px #ffd600;
}

.trad-date-cell.selected-cell {
    background: #fff3e0 !important;
    border: 3px solid #b71c1c !important;
    box-shadow: 0 4px 16px rgba(183, 28, 28, 0.25) !important;
}

.trad-date-cell.fest-highlight-cell {
    background: #fffdf5;
    border-left: 4px solid #f59e0b;
}

.trad-date-cell.empty-cell {
    background: #fafafa;
    border-color: #e0e0e0;
    cursor: default;
    min-height: 82px;
}

.cell-tithi-text {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.62rem;
    font-weight: 800;
    color: #1a237e;
    line-height: 1.1;
    align-self: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.cell-date-num {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: #1e293b;
    text-align: center;
    align-self: center;
    justify-self: center;
    font-family: 'Outfit', sans-serif;
}

.cell-date-num.is-red {
    color: #d32f2f;
}

.cell-fest-icon {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    object-fit: contain;
    align-self: start;
    justify-self: end;
    opacity: 0.9;
}

.cell-fest-list {
    grid-column: 1 / -1;
    grid-row: 3;
}

.cell-fest-title {
    font-size: 0.55rem;
    font-weight: 800;
    color: #b71c1c;
    line-height: 1.1;
    background: rgba(255, 235, 238, 0.95);
    padding: 1px 3px;
    border-radius: 2px;
    border-left: 2px solid #d32f2f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

.cell-nak-text {
    grid-column: 1 / -1;
    grid-row: 4;
    font-size: 0.5rem;
    color: #78909c;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── WIDGET BOXES ── */
.trad-widget-box {
    width: 100%;
    min-height: 82px;
    height: 82px;
    padding: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.trad-widget-box.vivah {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px dashed #e65100;
}

.trad-widget-box.panchak {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    border: 2px dashed #1a237e;
}

.trad-widget-box.shubh {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 2px dashed #f57f17;
}

.trad-widget-box.promo-block {
    background: #fff;
    border: 2px solid #b71c1c;
    padding: 2px;
}

.trad-widget-box.promo-block .promo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trad-widget-title {
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2px;
}

.trad-widget-box.vivah .trad-widget-title { color: #b71c1c; }
.trad-widget-box.panchak .trad-widget-title { color: #1a237e; }
.trad-widget-box.shubh .trad-widget-title { color: #e65100; }

.trad-widget-desc {
    font-size: 0.55rem;
    font-weight: 700;
    color: #212121;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ── FOOTER ── */
.trad-cal-footer {
    background: linear-gradient(180deg, #fff3e0 0%, #ffe0b2 100%);
    border-top: 2px solid #b71c1c;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.trad-footer-mini {
    flex: 0 0 auto;
}

.trad-brand-emblem {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 100px;
}

.trad-brand-emblem img {
    height: 36px;
    object-fit: contain;
}

.trad-brand-text {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 900;
    color: #b71c1c;
    letter-spacing: 1px;
}

/* Mini Calendars */
.mini-cal-box {
    background: #fff;
    border: 1px solid #b71c1c;
    border-radius: 6px;
    padding: 4px 6px;
    min-width: 140px;
}

.mini-cal-title {
    font-size: 0.6rem;
    font-weight: 900;
    color: #b71c1c;
    text-align: center;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.mini-cal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.55rem;
}

.mini-cal-table th {
    font-weight: 800;
    color: #1a237e;
    text-align: center;
    padding: 1px;
}

.mini-cal-table td {
    text-align: center;
    padding: 1px 2px;
    font-weight: 700;
    color: #212121;
}

.mini-cal-table td.mini-sun {
    color: #d32f2f;
    font-weight: 900;
}

.mini-cal-table td.mini-empty {
    color: transparent;
}

/* ── MODAL DETAIL ── */
.cal-detail-modal {
    border: 2px solid #b71c1c;
    border-radius: 12px;
    overflow: hidden;
}

.cal-detail-head {
    background: linear-gradient(135deg, #b71c1c, #880e4f);
    padding: 12px 16px;
    color: #fff;
    border-bottom: none;
}

.cal-detail-head .modal-title {
    font-weight: 900;
    font-size: 1rem;
    margin: 0;
    color: #ffd600;
}

.cal-detail-head .sub-text {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.9);
}

.cal-detail-body {
    padding: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.pan-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.pan-box {
    background: #fff9e6;
    border: 1px solid #ffe0b2;
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
}

.pan-box .lbl {
    font-size: 0.58rem;
    font-weight: 800;
    color: #b71c1c;
    text-transform: uppercase;
}

.pan-box .val {
    font-size: 0.85rem;
    font-weight: 900;
    color: #1a237e;
    line-height: 1.1;
}

.pan-time-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.pan-time-card {
    background: #f8fafc;
    border-radius: 6px;
    padding: 5px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.pan-time-card .t-lbl {
    font-size: 0.55rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
}

.pan-time-card .t-val {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.cal-detail-body h6 {
    font-size: 0.75rem !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
    .trad-hindi-month-name { font-size: 1.5rem; }
    .trad-english-month { font-size: 1.3rem; }
    .trad-year-pill { font-size: 1.1rem; }
    .trad-date-cell { min-height: 72px; height: 72px; }
    .cell-date-num { font-size: 1.6rem; }
    .trad-widget-box { min-height: 72px; height: 72px; }
}

@media (max-width: 768px) {
    .trad-table-wrapper {
        padding: 2px 1px;
        overflow-x: hidden;
    }
    .trad-grid-table {
        min-width: 0;
        width: 100%;
        border-spacing: 0;
    }
    .trad-header-flex {
        flex-direction: column;
        text-align: center;
    }
    .trad-samvat-box, .trad-header-right {
        text-align: center;
        min-width: unset;
    }
    .trad-month-center { justify-content: center; }
    .trad-cal-footer {
        flex-direction: column;
    }
    .trad-footer-mini { width: 100%; }
    .mini-cal-box { min-width: unset; width: 100%; }
    .trad-date-cell {
        min-height: 92px;
        height: 92px;
        padding: 2px;
        border-radius: 10px;
    }
    .cell-date-num { font-size: 2rem; }
    .cell-fest-icon { width: 28px; height: 28px; }
    .cell-tithi-text { font-size: 0.66rem; }
    .cell-nak-text { font-size: 0.62rem; }
    .cell-fest-title { font-size: 0.58rem; }
    .trad-weekday-label-cell { width: 38px; }
    .trad-grid-data-cell { width: calc((100% - 38px) / var(--week-cols, 5)); }
    .trad-day-pill {
        min-height: 92px;
        padding: 5px 2px;
        border-radius: 10px;
        gap: 1px;
    }
    .trad-day-pill .hi-day { font-size: 0.62rem; }
    .trad-day-pill .en-day { font-size: 0.46rem; letter-spacing: 0.2px; }
    .trad-widget-box {
        min-height: 92px;
        height: 92px;
    }
}

@media (max-width: 480px) {
    .trad-hindi-month-name { font-size: 1.2rem; }
    .trad-english-month { font-size: 1rem; }
    .trad-grid-table { min-width: 0; width: 100%; border-spacing: 0; }
    .trad-weekday-label-cell { width: 34px; }
    .trad-grid-data-cell { width: calc((100% - 34px) / var(--week-cols, 5)); }
    .trad-date-cell { min-height: 72px; height: 72px; }
    .trad-day-pill { min-height: 72px; padding: 4px 1px; }
    .trad-day-pill .hi-day { font-size: 0.54rem; }
    .trad-day-pill .en-day { font-size: 0.4rem; letter-spacing: 0; }
    .cell-date-num { font-size: 1.45rem; }
    .cell-tithi-text { font-size: 0.5rem; max-width: 78%; }
    .cell-fest-title { font-size: 0.42rem; padding: 1px 2px; }
    .cell-nak-text { font-size: 0.42rem; }
    .cell-fest-icon { width: 20px; height: 20px; }
    .trad-widget-box { min-height: 72px; height: 72px; }
    .trad-widget-title { font-size: 0.5rem; }
    .trad-widget-desc { font-size: 0.46rem; line-height: 1.1; }
}

@media print {
    .trad-hdr-btn-group, .trad-hdr-datepicker { display: none !important; }
    .trad-calendar-board { box-shadow: none; border: 2px solid #000; }
}
