/* Style 5 - Row-based prayer list
   Clean design with admin colors for header, accents, and active highlights */
:root {
    --bg-gradient-start: #f5f7fa;
    --bg-gradient-end: #e8ecf1;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --text-color: #2d3436;
    --text-muted: #636e72;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(145deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-color);
    overflow: hidden;
}

/* ─── Header ─── */
.header {
    flex-shrink: 0;
    height: 14vh;
    min-height: 80px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 0 3vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo {
    width: clamp(40px, 6vw, 80px);
    height: auto;
    max-height: 12vh;
}

.name {
    color: #ffffff;
    font-size: calc(clamp(1rem, 3.2vmin, 2.4rem) * var(--font-multiplier-headers, 1));
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.date-time {
    text-align: right;
}

.date-time .time {
    font-size: calc(clamp(1.4rem, 4.8vmin, 4rem) * var(--font-multiplier-headers, 1));
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1;
}

.date-time .date {
    font-size: calc(clamp(0.6rem, 1.6vmin, 1rem) * var(--font-multiplier-headers, 1));
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.05em;
}

.ampm {
    font-size: calc(clamp(0.4rem, 1vw, 0.6rem) * var(--font-multiplier-headers, 1));
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0.3ch;
}

.container {
    flex: 1 1 auto;
    display: flex;
    overflow-y: hidden;
    width: 100%;
    padding: 1.5vh 1.5vw;
}

/* ─── Prayer Cards ─── */
.prayer-card {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prayer-card-header {
    background: transparent !important;
    color: var(--text-muted);
    font-size: calc(clamp(0.6rem, 1vw, 1rem) * var(--font-multiplier-headers, 1));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 1.5vmin 2vmin 0;
    text-align: center;
    flex-shrink: 0;
}

.prayer-card.show-False {
    display: none;
}

.Sunrise .prayer-card-header {
    color: var(--primary-color);
    font-weight: 700;
}

.time-container {
    background: transparent;
    text-align: center;
    padding: 0.3vmin 0;
    flex-shrink: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.time-label {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: calc(clamp(0.5rem, 0.7vw, 0.7rem) * var(--font-multiplier-labels, 1));
    margin-bottom: 0.25vmin;
    line-height: 1.2;
}

.time-value {
    font-weight: 700;
    color: var(--text-color);
    font-size: calc(clamp(1rem, 2.4vw, 2.4rem) * var(--font-multiplier-time-values, 1));
    letter-spacing: -0.02em;
    margin-bottom: 0.5vmin;
    line-height: 1.1;
}

/* Active prayer */
.current-prayer {
    box-shadow: 0 0 0 3px var(--primary-color), 0 0 20px color-mix(in srgb, var(--primary-color) 25%, transparent);
    transform: scale(1.02);
    background: var(--card-bg);
}

.current-prayer .prayer-card-header {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: calc(clamp(0.8rem, 1.2vw, 1.2rem) * var(--font-multiplier-headers, 1));
}

.current-prayer .time-value {
    color: var(--primary-color);
}

.current-prayer .time-label {
    color: var(--primary-color);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border-radius: 15px;
    z-index: 1000;
    font-size: clamp(1.5rem, 2.5vw, 5rem);
    justify-content: center;
    align-items: center;
    animation: pulse 2s infinite;
    display: none;
}

.modal.active {
    display: flex;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* ─── Prayer Grid — row list ─── */
.prayer-grid {
    display: flex;
    flex-direction: column;
    gap: 1vmin;
    height: 100%;
    width: 100%;
    overflow: hidden;
    padding: 1vh 2vw;
    justify-content: center;
}

.prayer-grid .prayer-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1.5vmin 2.5vmin;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.prayer-grid .prayer-card-header {
    grid-column: 2;
    text-align: center;
    padding: 0;
    font-size: calc(clamp(0.8rem, 1.2vw, 1.3rem) * var(--font-multiplier-headers, 1));
    min-width: 10vw;
}

.prayer-grid .prayer-card-content {
    display: contents;
}

.prayer-grid .time-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3vmin;
}

.prayer-grid .time-container:first-child {
    grid-column: 1;
    grid-row: 1;
}

.prayer-grid .time-container:last-child {
    grid-column: 3;
    grid-row: 1;
}

.prayer-grid .time-label {
    font-size: calc(clamp(0.5rem, 0.7vw, 0.7rem) * var(--font-multiplier-labels, 1));
}

.prayer-grid .time-value {
    font-size: calc(clamp(1.1rem, calc(1.4vh + 2vw), 3.2rem) * var(--font-multiplier-time-values, 1));
}

.prayer-grid .current-prayer {
    padding: 2.5vmin 3vmin;
    margin: 0.5vmin 0;
}

.prayer-grid .current-prayer .time-value {
    font-size: calc(clamp(1.4rem, calc(1.8vh + 2.6vw), 4rem) * var(--font-multiplier-time-values, 1));
}

.Sunrise {
    background: var(--bg-gradient-start);
    border: 1px dashed var(--card-border);
    box-shadow: none;
}

/* ─── Footer ─── */
.footer {
    flex-shrink: 0;
    height: 10vh;
    min-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2vw;
    padding: 1.5vmin 2vw;
    background: linear-gradient(145deg, var(--bg-gradient-start), var(--bg-gradient-end));
}

.footer-card {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1vmin 2vmin;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: calc(clamp(0.7rem, calc(0.6vh + 1vw), 1.6rem) * var(--font-multiplier-footers, 1));
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    gap: 1vmin;
    letter-spacing: 0.03em;
}

.footer-card.next-prayer {
    flex: 1 1 35%;
}

.footer-card.next-prayer i {
    opacity: 0.8;
}

.footer-card.jumaa {
    flex: 1 1 60%;
    display: flex;
    flex-wrap: wrap;
    gap: 2vmin;
    justify-content: space-evenly;
    font-size: calc(clamp(1.1rem, calc(1.4vh + 2vw), 2.5rem) * var(--font-multiplier-time-values, 1));
    font-weight: 700;
}

.footer-card.jumaa div {
    white-space: nowrap;
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .header {
        height: auto;
        min-height: 10vh;
        padding: 2vh 3vw;
        flex-direction: column;
        gap: 1vh;
        text-align: center;
    }

    .name {
        position: static;
        transform: none;
        font-size: calc(clamp(0.8rem, 3.2vw, 1.2rem) * var(--font-multiplier-headers, 1));
        max-width: 90%;
    }

    .date-time {
        text-align: center;
    }

    .container {
        overflow-y: visible;
        height: auto;
        padding: 0 4vw;
    }

    .prayer-grid {
        gap: 1vw;
        padding: 1vw;
    }

    .prayer-grid .prayer-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .prayer-grid .prayer-card-header {
        text-align: center;
        min-width: auto;
    }

    .prayer-grid .prayer-card-content {
        justify-content: center;
        gap: 4vw;
    }

    .prayer-grid .time-container {
        align-items: center;
        text-align: center;
    }

    .footer {
        height: auto;
        min-height: 10vh;
        flex-direction: column;
        padding: 1.5vh 2vw;
        gap: 1.5vh;
    }

    .footer-card {
        width: 100%;
        justify-content: center;
        font-size: calc(clamp(1rem, 4vw, 2rem) * var(--font-multiplier-footers, 1));
        padding: 2vmin;
    }

    .footer-card.jumaa {
        font-size: calc(clamp(0.8rem, 3.2vw, 1.6rem) * var(--font-multiplier-footers, 1));
    }
}