/* ===== PRAYER TIMES - MODERN CLEAN DESIGN ===== */

/* Define plugin color/font variables that pull from theme (with fallbacks) */
.prayer-times-container {
    /* Try theme primary/accent color, fallback to coral */
    --prayer-primary-color: var(--global-palette1, var(--accent-color, var(--primary-color, #f46b45)));

    /* Try theme secondary color, fallback to gold */
    --prayer-secondary-color: var(--global-palette2, var(--secondary-color, #eea849));

    /* Try theme fonts */
    --prayer-font: var(--global-body-font-family, var(--body-font, system-ui, sans-serif));
}

.prayer-times-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0 12px 0;
    background: linear-gradient(135deg, var(--prayer-primary-color) 0%, var(--prayer-secondary-color) 100%);
    color: white;
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    font-family: var(--prayer-font);
}

/* Countdown timer - glassmorphic card design */
.prayer-countdown {
    width: calc(100% - 16px);
    margin: 0 8px 10px 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Date display styles */
.countdown-dates {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    opacity: 0.95;
    font-weight: 500;
    line-height: 1.3;
}

.islamic-date {
    font-weight: 600;
    color: white;
}

.gregorian-date {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.date-separator {
    opacity: 0.5;
    margin: 0 2px;
}

.countdown-text {
    color: white;
    font-weight: 400;
    line-height: 1.4;
}

.countdown-text strong {
    font-weight: 600;
    letter-spacing: 0.3px;
}

#countdown-time {
    font-weight: 600;
    opacity: 0.95;
}

/* Prayer times rows - with subtle borders */
.prayer-times-row {
    display: grid;
    grid-template-columns: 50px repeat(6, 1fr);
    gap: 2px;
    width: 100%;
    padding: 6px 8px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prayer-times-row:last-of-type {
    border-bottom: none;
}

/* Label column - modern typography */
.prayer-times-row .prayer-name {
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    padding: 4px 2px;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* Prayer cells - improved spacing */
.prayer-times-row .prayer-time {
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    padding: 4px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Next prayer highlight - refined colors */
.highlight {
    color: rgb(15, 26, 33) !important;
    border-radius: 5px;
}

/* ===== RAMADAN ELEVATED CARD DESIGN ===== */

.ramadan-times-row {
    width: 100%;
    margin: 0;
    padding: 14px 16px 14px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    font-size: 12.75px;
    white-space: nowrap;
}

.ramadan-label {
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ramadan-time {
    color: rgba(255, 255, 255, 0.98);
    font-weight: 400;
    line-height: 1.4;
}

.ramadan-time strong {
    font-weight: 700;
    color: white;
    font-size: 1.1em;
    letter-spacing: 0.3px;
}

.ramadan-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin: 0 4px;
}

/* Extra small screens - reduced font size for Maghrib */
@media (max-width: 380px) {
    .prayer-times-container {
        padding: 8px 0 8px 0;
    }

    .prayer-countdown {
        font-size: 0.7em;
        padding: 8px 10px;
        margin: 0 6px 8px 6px;
        width: calc(100% - 12px);
        gap: 4px;
    }

    .countdown-dates {
        flex-direction: column;
        gap: 3px;
        font-size: 0.8em;
    }

    .date-separator {
        display: none;
    }

    .prayer-times-row {
        grid-template-columns: 42px repeat(6, 1fr);
        gap: 1px;
        padding: 4px 8px;
    }

    .prayer-times-row .prayer-name {
        font-size: 0.55em;
        padding: 3px 1px;
    }

    .prayer-times-row .prayer-time {
        font-size: 0.55em;
        padding: 3px 0px;
    }

    .ramadan-times-row {
        font-size: 9px;
        padding: 10px 8px;
        gap: 4px;
    }

    .ramadan-separator {
        margin: 0 2px;
    }
}

/* Small mobile screens - reduced from 0.7em to 0.65em */
@media (min-width: 381px) and (max-width: 600px) {
    .prayer-times-container {
        padding: 10px 0 10px 0;
    }

    .prayer-countdown {
        font-size: 0.7em;
        padding: 9px 10px;
        margin: 0 6px 8px 6px;
        width: calc(100% - 12px);
        gap: 5px;
    }

    .countdown-dates {
        font-size: 0.85em;
        gap: 6px;
    }

    .prayer-times-row {
        grid-template-columns: 48px repeat(6, 1fr);
        gap: 2px;
        padding: 5px 6px;
    }

    .prayer-times-row .prayer-name {
        font-size: 0.65em;
        padding: 3px 2px;
    }

    .prayer-times-row .prayer-time {
        font-size: 0.65em;
        padding: 3px 1px;
    }

    .ramadan-times-row {
        font-size: 10px;
        padding: 12px 10px;
        gap: 6px;
    }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 768px) {
    .prayer-countdown {
        font-size: 0.9em;
        padding: 10px 12px;
        gap: 6px;
    }

    .countdown-dates {
        font-size: 0.85em;
    }

    .prayer-times-row {
        grid-template-columns: 60px repeat(6, 1fr);
        gap: 3px;
        padding: 6px 8px;
    }

    .prayer-times-row .prayer-name {
        font-size: 0.85em;
    }

    .prayer-times-row .prayer-time {
        font-size: 0.85em;
        padding: 4px 2px;
    }

    .ramadan-times-row {
        font-size: 11px;
        padding: 13px 12px;
        gap: 7px;
    }
}

/* Desktop - scaled down for compactness */
@media (min-width: 769px) {
    .prayer-times-container {
        padding: 8px 0 8px 0;
    }

    .prayer-countdown {
        padding: 7px 10px;
        margin: 0 8px 6px 8px;
        width: calc(100% - 16px);
        font-size: 0.75em;
        gap: 4px;
    }

    .countdown-dates {
        font-size: 0.85em;
        gap: 6px;
    }

    .prayer-times-row {
        grid-template-columns: 55px repeat(6, 1fr);
        gap: 2px;
        padding: 4px 8px;
    }

    .prayer-times-row .prayer-name {
        font-size: 0.75em;
    }

    .prayer-times-row .prayer-time {
        font-size: 0.75em;
        padding: 3px 2px;
    }

    .ramadan-times-row {
        font-size: 12.75px;
        padding: 10px 12px;
        gap: 8px;
    }
}

/* Kadence button fixes */
@media (max-width: 768px) {
    .wp-block-kadence-column.kadence-column_5e734d-b6 .wp-block-kadence-advancedbtn.kb-buttons-wrap {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .wp-block-kadence-column.kadence-column_5e734d-b6 .wp-block-kadence-advancedbtn.kb-buttons-wrap .wp-block-kadence-singlebtn {
        flex: 1 1 50%;
        margin-bottom: 10px;
    }
}

/* Narrower prayer times on larger screens */
@media (min-width: 755px) {
    .prayer-times-row {
        width: 80%;
        margin: 0 auto;
    }
}
