/* Lite theme — fully self-contained (the only stylesheet loaded for this
   theme), so it also carries the shared nav and footer chrome plus the
   classes used by includes/notifications.php and includes/zuhrchangebanner.php.
   Palette from skins/*.css (fallbacks inline).

   Layout contract: at 992px+ the board fills the viewport exactly with no
   page scroll (only the two bottom panels scroll internally if they must):
   a plain white salaah-times panel on the left, a bold colour-block
   countdown panel on the right, separated by a torn/zigzag edge. Below
   992px it's a normal stacked, scrolling page -- the salaah-times list
   stays the dominant content and the countdown collapses to a slim strip
   right below it, rather than the full colour block. */

html, body {
    margin: 0;
    padding: 0;
    background: var(--lt-page-bg, #eef1f4);
    color: var(--lt-text, #33404a);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a:link, a:visited, a:hover, a:active {
    color: var(--lt-accent, #1a6fd1);
    text-decoration: none;
}
.lt-num { font-variant-numeric: tabular-nums; }

/* ---------- Nav (shared markup from navigation.php) ---------- */
#nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--lt-panel-bg, #ffffff);
    border-bottom: 1px solid var(--lt-line, rgba(20, 30, 40, .1));
}
#nav li { float: right; }
#nav li a {
    display: block;
    color: var(--lt-muted, #7c8a97);
    text-align: center;
    padding: 0 14px;
    line-height: 48px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
}
#nav li a:hover:not(.active) { color: var(--lt-text, #33404a); }
#nav li span { display: block; text-align: center; padding: 0 20px; line-height: 48px; }
#nav .active { background: transparent; box-shadow: inset 0 -2px 0 var(--lt-accent, #1a6fd1); }
#nav .active a { color: var(--lt-text, #33404a); }
#nav #nav_name {
    font-weight: 800;
    text-transform: none;
    letter-spacing: -.01em;
    font-size: 17px;
    line-height: 48px;
    color: var(--lt-text, #33404a);
    text-align: left;
}
#nav #myname { width: 500px; float: left; margin: 0 0 0 20px; }

#toggle { display: none; width: 26px; height: 0; margin: 10px auto; }
#toggle span:after, #toggle span:before { content: ""; position: absolute; left: 0; top: -8px; }
#toggle span:after { top: 8px; }
#toggle span { position: relative; display: block; }
#toggle span, #toggle span:after, #toggle span:before {
    width: 100%;
    height: 2px;
    background-color: var(--lt-text, #33404a);
    transition: all .3s;
    backface-visibility: hidden;
    border-radius: 2px;
}
#toggle.on span { background-color: transparent; }
#toggle.on span:before { transform: rotate(45deg) translate(5px, 5px); }
#toggle.on span:after { transform: rotate(-45deg) translate(7px, -8px); }
#toggle.on + #menu { opacity: 1; visibility: visible; }
.show-menu { text-decoration: none; text-align: center; padding: 10px 0; display: none; }
input[type=checkbox] { display: none; }
input[type=checkbox]:checked ~ #menu { display: block; }

@media screen and (max-width: 975px) {
    #nav ul { position: static; display: none; }
    #nav li { margin-bottom: 1px; }
    #nav ul li, #nav li a { width: 100%; }
    .show-menu { display: block; }
    #toggle { display: block; }
    #nav #myname { width: 100%; text-align: center; }
    #nav #nav_name { font-size: 15px; line-height: 36px; text-align: center; }
}

/* ---------- Footer (shared markup from footer.php) — static, never fixed ---------- */
footer.footer {
    width: 100%;
    box-sizing: border-box;
    color: var(--lt-muted, #7c8a97);
    font-size: 12px;
    background: var(--lt-panel-bg, #ffffff);
    border-top: 1px solid var(--lt-line, rgba(20, 30, 40, .1));
    padding: 10px 16px;
    text-align: center;
}
footer.footer a { color: var(--lt-muted, #7c8a97); }
footer.footer a:hover { color: var(--lt-accent, #1a6fd1); }
footer.footer { position: relative; }
.mb-switchers { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; gap: 12px; line-height: 0; }
.mb-switchers a { color: inherit; opacity: .45; }
.mb-switchers a:hover { opacity: 1; color: var(--lt-accent, #1a6fd1); }
.mb-switchers svg { width: 18px; height: 18px; display: block; fill: currentColor; }
@media screen and (max-width: 975px) {
    footer.footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; min-height: 44px; }
    footer.footer .mb-footer-info { display: none; }
}

/* ---------- Board ---------- */
.lt-board {
    max-width: 1900px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.lt-hidden { display: none; }

.lt-panels {
    display: grid;
    grid-template-columns: 1.15fr 24px 1fr;
    align-items: stretch;
}

/* ---------- Left panel: clock, date, salaah times ---------- */
.lt-left {
    background: var(--lt-panel-bg, #ffffff);
    padding: clamp(14px, 2.4vh, 34px) clamp(16px, 2.4vw, 44px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.lt-brand {
    display: flex;
    align-items: baseline;
    gap: .6em;
    font-size: clamp(.75rem, 1.5vh, 1rem);
    color: var(--lt-muted, #7c8a97);
    margin-bottom: clamp(6px, 1.2vh, 14px);
}
.lt-brand-name { font-weight: 800; color: var(--lt-text, #33404a); }

.lt-clock {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
    /* The left column is roughly half the viewport's WIDTH (not height),
       so the "H:i:s AM/PM" string needs a vw-aware cap too, or it wraps
       on a wide-but-short laptop window. */
    font-size: clamp(3rem, min(11vh, 5.4vw), 7rem);
    line-height: 1;
    white-space: nowrap;
    color: var(--lt-accent, #1a6fd1);
}
.lt-date {
    margin-top: clamp(4px, .8vh, 10px);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    font-size: clamp(.75rem, 1.5vh, 1.05rem);
    color: var(--lt-accent, #1a6fd1);
}
.lt-sep { margin: 0 .6em; opacity: .55; }

.lt-times {
    margin-top: clamp(14px, 2.6vh, 30px);
    border-top: 1px solid var(--lt-line, rgba(20, 30, 40, .1));
}
.lt-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: clamp(10px, 1.6vw, 24px);
    padding: clamp(6px, 1.4vh, 16px) 0;
    border-bottom: 1px solid var(--lt-line, rgba(20, 30, 40, .1));
    transition: background-color .3s, box-shadow .3s;
}
.lt-row-head {
    border-bottom-width: 2px;
    padding-top: 0;
    padding-bottom: clamp(6px, 1vh, 10px);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: clamp(.6rem, 1.2vh, .8rem);
    font-weight: 700;
    color: var(--lt-muted, #7c8a97);
}
.lt-row-name {
    font-weight: 700;
    font-size: clamp(1.4rem, 3.6vh, 2.4rem);
    color: var(--lt-text, #33404a);
}
.lt-row-adhan, .lt-row-salaah {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.1rem, 3vh, 2rem);
    color: var(--lt-accent, #1a6fd1);
    text-align: right;
    min-width: 2.6em;
}
.lt-row-head .lt-row-adhan, .lt-row-head .lt-row-salaah {
    font-weight: 700;
    font-size: clamp(.85rem, 1.8vh, 1.15rem);
    color: var(--lt-muted, #7c8a97);
}
.lt-row-minor .lt-row-name, .lt-row-minor .lt-row-adhan { color: var(--lt-muted, #7c8a97); font-weight: 600; }
.lt-row-minor .lt-row-salaah { color: var(--lt-line-strong, #c3ccd4); font-weight: 600; }
.lt-row-jumuah .lt-row-name::after {
    content: "Khutbah";
    display: block;
    font-size: .6em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--lt-muted, #7c8a97);
    margin-top: 2px;
}

/* Next salaah (set by script.js) */
.lt-row.is-next .lt-row-name { color: var(--lt-accent, #1a6fd1); }

/* Current salaah — js/livetime.js puts .vibrate-1 on the .azan-checker's
   parent, i.e. this row. Filled accent pill, matching the reference image. */
.lt-row.vibrate-1 {
    background: var(--lt-accent, #1a6fd1);
    border-radius: 10px;
    box-shadow: 0 0 0 1px var(--lt-accent, #1a6fd1);
    padding-left: 12px;
    padding-right: 12px;
    margin: 0 -12px;
}
.lt-row.vibrate-1 .lt-row-name,
.lt-row.vibrate-1 .lt-row-adhan,
.lt-row.vibrate-1 .lt-row-salaah {
    color: var(--lt-accent-ink, #ffffff);
}

/* ---------- Zigzag divider between panels (desktop only) ---------- */
.lt-divider {
    background:
        linear-gradient(135deg, var(--lt-panel-bg, #ffffff) 25%, transparent 25%) -12px 0 / 24px 24px repeat-y,
        linear-gradient(225deg, var(--lt-panel-bg, #ffffff) 25%, transparent 25%) -12px 0 / 24px 24px repeat-y,
        linear-gradient(315deg, var(--lt-panel-bg, #ffffff) 25%, transparent 25%) 0 0 / 24px 24px repeat-y,
        linear-gradient(45deg, var(--lt-panel-bg, #ffffff) 25%, transparent 25%) 0 0 / 24px 24px repeat-y;
    background-color: var(--lt-accent, #1a6fd1);
}

/* ---------- Right panel: countdown ---------- */
.lt-right {
    background: var(--lt-accent, #1a6fd1);
    color: var(--lt-accent-ink, #ffffff);
    box-sizing: border-box;
    padding: clamp(14px, 2.4vh, 34px) clamp(16px, 2.4vw, 44px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.lt-next { position: relative; z-index: 1; }
.lt-next-label {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    font-size: clamp(1rem, 2.3vh, 1.6rem);
    opacity: .9;
    margin-bottom: clamp(10px, 1.8vh, 22px);
}
.lt-next-label span { font-weight: 800; }
.lt-next-count {
    display: flex;
    align-items: flex-start;
    gap: clamp(6px, 1vw, 16px);
}
.lt-count-part {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, .8vh, 10px);
}
.lt-count-part span {
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: clamp(3rem, 10vh, 7rem);
    line-height: .95;
}
.lt-count-part small {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    font-size: clamp(.7rem, 1.5vh, 1.05rem);
    padding: .3em .8em;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
}
.lt-count-sep {
    font-weight: 800;
    font-size: clamp(3rem, 10vh, 7rem);
    line-height: .95;
    opacity: .6;
    align-self: flex-start;
}
.lt-next-meta {
    margin-top: clamp(10px, 1.8vh, 22px);
    font-size: clamp(1rem, 2vh, 1.4rem);
    opacity: .85;
}
.lt-stripes {
    position: absolute;
    right: -10%;
    bottom: -20%;
    width: 70%;
    height: 70%;
    background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 14px, transparent 14px 28px);
    pointer-events: none;
}

/* ---------- Laptop / TV: fill the viewport, no page scroll ---------- */
@media (min-width: 992px) {
    html, body { height: 100%; overflow: hidden; }
    body { display: flex; flex-direction: column; }
    #nav, footer.footer { flex: 0 0 auto; }
    .lt-board { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .lt-panels { flex: 1 1 auto; min-height: 0; }
    .lt-left { overflow-y: auto; }
}

/* ---------- Mobile / tablet: stacked, scrolling, times list stays the focus ---------- */
@media (max-width: 991px) {
    .lt-panels { grid-template-columns: 1fr; }
    .lt-divider { display: none; }

    .lt-left { padding: 16px; }
    .lt-brand { justify-content: center; text-align: center; flex-wrap: wrap; }
    .lt-clock { text-align: center; font-size: clamp(2.2rem, 11vw, 3.4rem); }
    .lt-date { text-align: center; }

    /* Countdown collapses to a slim strip right under the times list,
       instead of the full colour-block panel -- salaah times stay the
       dominant content on a phone. */
    .lt-right {
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .lt-stripes { display: none; }
    .lt-next { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; justify-content: space-between; }
    .lt-next-label { margin: 0; font-size: .8rem; order: 1; }
    .lt-next-count { order: 2; gap: 4px; }
    .lt-count-part span { font-size: 1.5rem; }
    .lt-count-part small { display: none; }
    .lt-count-sep { font-size: 1.5rem; }
    .lt-next-meta { display: none; }
}
