/* =========================================================
   POOJA TIMINGS
   A day-tabbed timetable. The whole day is readable at once
   rather than one pooja at a time.
   ========================================================= */

.pt-page {
    --pt-green: var(--brand-sec-color, #013F1F);
    --pt-accent: var(--brand-color, #02A550);
    --pt-gold: #C08A2E;
    --pt-paper: #FFFFFF;
    --pt-ground: #F7F6F1;
    --pt-line: #E5E3DA;
    --pt-text: #1C2B23;
    --pt-muted: #6B7A72;

    font-family: var(--primary-font, 'Poppins', sans-serif);
    color: var(--pt-text);
    background: var(--pt-ground);
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.pt-hero {
    padding: clamp(36px, 6vw, 68px) 0 clamp(28px, 4vw, 44px);
    text-align: center;
    background: linear-gradient(180deg, #F6F1E2 0%, var(--pt-ground) 100%);
    border-bottom: 1px solid var(--pt-line);
}

.pt-hero-title {
    margin: 0;
    font-size: clamp(30px, 5.2vw, 46px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--pt-green);
}

.pt-hero-text {
    max-width: 52ch;
    margin: 12px auto 0;
    font-size: clamp(14px, 1.6vw, 16px);
    line-height: 1.65;
    color: var(--pt-muted);
}

/* ---------------------------------------------------------
   BODY
   --------------------------------------------------------- */

.pt-body {
    padding: clamp(24px, 4vw, 44px) 0 clamp(44px, 7vw, 84px);
}

/* ---------------------------------------------------------
   DAY TABS
   Horizontally scrollable on narrow screens so seven days
   never wrap into a broken grid.
   --------------------------------------------------------- */

.pt-days {
    display: flex;
    gap: 8px;
    margin-bottom: clamp(20px, 3vw, 30px);
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.pt-days::-webkit-scrollbar {
    height: 4px;
}

.pt-days::-webkit-scrollbar-thumb {
    background: var(--pt-line);
    border-radius: 4px;
}

.pt-day {
    position: relative;
    flex: 1 0 auto;
    min-width: 104px;
    padding: 12px 16px;
    font-family: inherit;
    text-align: left;
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: 10px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pt-day:hover {
    border-color: #C9CFC9;
}

.pt-day-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-text);
}

.pt-day-meta {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--pt-muted);
}

.pt-day.is-active {
    background: var(--pt-green);
    border-color: var(--pt-green);
}

.pt-day.is-active .pt-day-name,
.pt-day.is-active .pt-day-meta {
    color: #FFFFFF;
}

.pt-day.is-active .pt-day-meta {
    opacity: 0.75;
}

/* Today gets a quiet marker when it is not the selected tab. */
.pt-day.is-today:not(.is-active) .pt-day-meta {
    font-weight: 600;
    color: var(--pt-accent);
}

/* Marks a day that carries a dated special pooja. */
.pt-day-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    background: var(--pt-gold);
    border-radius: 50%;
}

/* ---------------------------------------------------------
   SCHEDULE ROWS
   --------------------------------------------------------- */

.pt-panel {
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: 12px;
    overflow: hidden;
}

.pt-item {
    display: grid;
    grid-template-columns: 104px 36px 1fr auto;
    align-items: start;
    gap: 0 4px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--pt-line);
}

.pt-item:last-child {
    border-bottom: 0;
}

/* ---- Time column ---- */

.pt-time {
    padding-top: 1px;
}

.pt-time-start {
    display: block;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--pt-green);
    font-variant-numeric: tabular-nums;
}

.pt-time-suffix {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pt-muted);
}

.pt-time-end {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--pt-muted);
    font-variant-numeric: tabular-nums;
}

/* ---- Timeline spine ---- */

.pt-spine {
    position: relative;
    align-self: stretch;
    justify-self: center;
    width: 1px;
    background: var(--pt-line);
}

.pt-spine-dot {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 9px;
    height: 9px;
    transform: translateX(-50%);
    background: var(--pt-paper);
    border: 2px solid var(--pt-accent);
    border-radius: 50%;
}

.pt-item.is-special .pt-spine-dot {
    border-color: var(--pt-gold);
    background: var(--pt-gold);
}

/* The pooja logo, sitting on the spine in place of the dot. */
.pt-spine-logo {
    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 4px;
    transform: translateX(-50%);
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: 50%;
}

.pt-spine-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.pt-item.is-special .pt-spine-logo {
    border-color: var(--pt-gold);
}

/* ---- Content ---- */

.pt-content {
    padding-left: 14px;
    min-width: 0;
}

.pt-name {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pt-text);
}

.pt-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #7A5510;
    background: rgba(192, 138, 46, 0.12);
    border: 1px solid rgba(192, 138, 46, 0.3);
    border-radius: 20px;
}

.pt-desc {
    max-width: 68ch;
    margin: 7px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--pt-muted);
}

/* ---- Thumbnail: supporting, never the hero ---- */

.pt-thumb {
    width: 84px;
    height: 84px;
    margin-left: 18px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--pt-ground);
}

.pt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------------------------------------------------------
   EMPTY STATES
   --------------------------------------------------------- */

.pt-empty {
    margin: 0;
    padding: 40px 22px;
    text-align: center;
    font-size: 14px;
    color: var(--pt-muted);
}

.pt-empty-page {
    padding: 60px 24px;
    text-align: center;
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: 12px;
}

.pt-empty-page h2 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 600;
    color: var(--pt-text);
}

.pt-empty-page p {
    margin: 0;
    font-size: 14px;
    color: var(--pt-muted);
}

/* ---------------------------------------------------------
   FOCUS
   --------------------------------------------------------- */

.pt-day:focus-visible {
    outline: 2px solid var(--pt-accent);
    outline-offset: 2px;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 720px) {

    .pt-item {
        grid-template-columns: 78px 32px 1fr;
        gap: 0;
        padding: 16px 14px;
    }

    .pt-spine-logo {
        width: 30px;
        height: 30px;
    }

    /* Thumbnail moves under the text rather than squeezing it. */
    .pt-thumb {
        grid-column: 3;
        width: 100%;
        height: 150px;
        margin: 12px 0 0 14px;
    }

    .pt-time-start {
        font-size: 16px;
    }

    .pt-time-suffix {
        display: block;
        margin-left: 0;
    }

    .pt-content {
        padding-left: 12px;
    }

    .pt-name {
        font-size: 15.5px;
    }

    .pt-day {
        min-width: 96px;
        padding: 10px 13px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pt-day {
        transition: none;
    }
}
