/* Prayer Times page (16 Oct 2026): the current month as an HTML table in the printed timetable's layout, and the
   printable timetable. Only today's row is highlighted (green, "Today" in the day column): Fridays are not shaded
   here, as they are on the printed sheet, so that scrolling a phone never suggests the wrong day. On phones the
   table starts at today, with the earlier days behind "Show 1–… <month>" (js/prayer-page.js). */

.prayer-jamaat {
    font-weight: 700;
    color: var(--emerald-deep);
}

.prayer-note {
    margin: 1.25rem 0 0;
    color: var(--slate);
}

/* ---------- Month table ---------- */

.prayer-month-section {
    padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

.prayer-month-guidance {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: rgba(196, 169, 98, 0.16);
    border-left: 3px solid var(--gold);
    color: var(--charcoal);
}

.prayer-month-scroll {
    overflow-x: auto;
    background: var(--ivory);
    box-shadow: var(--shadow-soft);
    border-top: 2px solid var(--gold);
}

.prayer-month-scroll:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.prayer-month-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.prayer-month-table caption {
    padding: 0.85rem 1rem;
    caption-side: top;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.prayer-month-table thead th {
    padding: 0.55rem 0.4rem;
    background: var(--emerald-deep);
    color: var(--ivory);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.15;
    border-left: 1px solid rgba(255, 254, 249, 0.12);
}

.prayer-month-table thead .prayer-month-sub th {
    background: #e8ede6;
    color: var(--emerald-deep);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.prayer-month-table tbody th,
.prayer-month-table tbody td {
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid rgba(196, 169, 98, 0.25);
    font-size: 0.95rem;
}

.prayer-month-table tbody th {
    font-weight: 700;
    color: var(--emerald-deep);
}

.prayer-month-table tbody .col-day {
    color: var(--slate);
    text-transform: none; /* "Thu", as on the printed timetable */
}

.prayer-month-table td.prayer-jamaat {
    background: rgba(196, 169, 98, 0.08);
}

/* Today: the only highlighted row. Opaque, so the sticky date/day cells hide the columns scrolling beneath them. */
.prayer-month-table tr.is-today th,
.prayer-month-table tr.is-today td {
    background: var(--emerald);
    color: var(--ivory);
}

.prayer-month-note td {
    padding: 0.45rem 1rem;
    background: var(--cream-warm);
    border-top: 2px solid var(--gold);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    color: var(--emerald-deep);
}

/* Date and day stay visible while the table scrolls sideways on phones. */
.prayer-month-table .col-date,
.prayer-month-table .col-day {
    position: sticky;
    z-index: 1;
    background: var(--ivory);
}

.prayer-month-table .col-date {
    left: 0;
    min-width: 3rem;
}

.prayer-month-table .col-day {
    left: 3rem;
    min-width: 3.25rem;
}

.prayer-month-table thead .col-date,
.prayer-month-table thead .col-day {
    z-index: 2;
    background: var(--emerald-deep);
}

.prayer-month-key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin: 0.85rem 0 0;
    font-size: 0.88rem;
    color: var(--slate);
}

.prayer-month-key span {
    display: inline-block;
    width: 14px;
    height: 14px;
}

.key-today {
    background: var(--emerald);
}

/* "Today" in the day column of today's row. */
.prayer-today-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Phones only: "Show 1–15 October" above a table that starts at today. */
.prayer-month-earlier {
    display: none;
}

/* ---------- Printable timetable ---------- */

/* Left-aligned with the rest of the page: styles.css centres this block. */
.timetable-section .current-timetable-card {
    max-width: none;
    margin: 0;
    text-align: left;
}

.timetable-section .section-intro-title {
    margin-bottom: 1.25rem;
}

.timetable-section .timetable-actions {
    justify-content: flex-start;
}

.timetable-section .current-timetable-preview {
    margin: 1.75rem 0 0;
    max-width: 520px;
}

.timetable-section .current-timetable-preview img {
    border-radius: 0;
    box-shadow: var(--shadow-medium);
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {
    .prayer-month-root.hide-past .prayer-month-table tr.is-past {
        display: none;
    }

    .prayer-month-root.hide-past .prayer-month-earlier {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        margin: 0 0 0.75rem;
        padding: 0.45rem 0.9rem;
        border: 1px solid rgba(196, 169, 98, 0.7);
        border-radius: 999px;
        background: var(--ivory);
        font: inherit;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--emerald);
        cursor: pointer;
    }

    .prayer-month-earlier:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
    }
}
