/* ============================================================================
   LMC Settings Plugin - Enhanced Prayer Times Styles
   File: prayer-times-frontend.css
   Version: 1.1.7
   Description: Modern, responsive styles for [prayer-times] shortcode
   Based on: https://loughboroughmuslimcentre.com/prayer-timetable/
   ============================================================================ */

/* === BASE PRAYER TIMES CONTAINER === */
.prayer-times-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === INDIVIDUAL PRAYER TIME ROW === */
.prayer-times {
    padding: 12px 16px;
    margin-bottom: 1px;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    min-height: 60px;
    position: relative;
    overflow: hidden;
}

/* Enhanced hover effects */
.prayer-times:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* === ROW BACKGROUND COLORS === */
.prayer-times:nth-child(even):not(#current):not(.friday):not(.desktop) {
    background-color: #f8fcf4;
    border-left: 3px solid #e8f5e8;
}

.prayer-times:nth-child(odd):not(#current):not(.friday):not(.desktop) {
    background-color: #ffffff;
    border-left: 3px solid #f0f0f0;
}

/* Current day highlighting */
.prayer-times#current {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
    box-shadow: 0 2px 10px rgba(243, 156, 18, 0.2);
    position: relative;
}

.prayer-times#current::before {
    content: "TODAY";
    position: absolute;
    top: 8px;
    right: 12px;
    background: #f39c12;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Friday highlighting */
.prayer-times.friday {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    position: relative;
}

.prayer-times.friday::after {
    content: "جمعة";
    position: absolute;
    top: 8px;
    right: 12px;
    background: #2196f3;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* === DATE METADATA SECTION === */
.prayer-times .date-meta {
    min-width: 140px;
    margin-right: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.prayer-times .date-meta .day-date {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.2;
}

.prayer-times .date-meta .sunrise {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #7f8c8d;
    gap: 6px;
}

.prayer-times .date-meta .sunrise .img {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prayer-times .date-meta .sunrise .img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: opacity(0.8);
}

/* === PRAYER TIMES BLOCKS === */
.prayer-times .times-blocks {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.prayer-times .times-blocks .block {
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 70px;
    position: relative;
}

.prayer-times .times-blocks .block:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.prayer-times .times-blocks .block .prayer-title {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prayer-times .times-blocks .block .start {
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.3;
}

/* Prayer-specific colors */
.prayer-times .times-blocks .block:nth-child(1) .prayer-title { color: #8e44ad; } /* Fajr */
.prayer-times .times-blocks .block:nth-child(3) .prayer-title { color: #f39c12; } /* Dhuhr */
.prayer-times .times-blocks .block:nth-child(4) .prayer-title { color: #e67e22; } /* Asr */
.prayer-times .times-blocks .block:nth-child(5) .prayer-title { color: #e74c3c; } /* Maghrib */
.prayer-times .times-blocks .block:nth-child(6) .prayer-title { color: #2c3e50; } /* Isha */

/* Sunrise block (mobile hidden, desktop visible) */
.prayer-times .times-blocks .block.sunrise-time {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* === DESKTOP HEADER ROW === */
.prayer-times.desktop {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    font-weight: 700;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 2px;
}

.prayer-times.desktop .date-meta .day-date {
    color: white;
    font-size: 14px;
}

.prayer-times.desktop .times-blocks .block .prayer-title {
    color: white;
    font-size: 12px;
    margin-bottom: 0;
    font-weight: 700;
}

/* Special positioning adjustments for Arabic text */
.prayer-times.desktop .times-blocks .block .prayer-title.dhuhr {
    position: relative;
    left: -2px;
}

.prayer-times.desktop .times-blocks .block .prayer-title.maghrib {
    position: relative;
    right: -2px;
}

/* === RESPONSIVE DESIGN === */

/* Desktop Layout (1025px and up) */
@media screen and (min-width: 1025px) {
    /* Enhanced desktop container */
    .prayer-times-container {
        padding: 0;
    }
    
    /* Hide mobile-only elements */
    .prayer-times .date-meta .sunrise,
    .prayer-times .times-blocks .block .prayer-title:not(.desktop .prayer-title) {
        display: none;
    }
    
    /* Show desktop header elements */
    .prayer-times.desktop .times-blocks .block .prayer-title {
        display: block;
        font-size: 13px;
        margin-bottom: 0;
    }
    
    /* Desktop layout adjustments */
    .prayer-times .date-meta {
        min-width: 120px;
    }
    
    .prayer-times .times-blocks {
        gap: 12px;
    }
    
    .prayer-times .times-blocks .block {
        min-width: 85px;
        padding: 10px 6px;
    }
    
    /* Show sunrise column on desktop */
    .prayer-times .times-blocks .block.sunrise-time {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    /* Enhanced hover effects for desktop */
    .prayer-times:hover {
        transform: translateX(4px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    }
}

/* Tablet Layout (768px to 1024px) */
@media screen and (max-width: 1024px) and (min-width: 768px) {
    .prayer-times {
        padding: 14px 12px;
    }
    
    .prayer-times .date-meta {
        min-width: 120px;
    }
    
    .prayer-times .times-blocks .block {
        min-width: 65px;
        padding: 6px 3px;
    }
    
    .prayer-times .times-blocks .block .start {
        font-size: 12px;
    }
}

/* Mobile Layout (767px and below) */
@media screen and (max-width: 767px) {
    /* Hide desktop-only elements */
    .prayer-times.desktop,
    .prayer-times .times-blocks .block.sunrise-time {
        display: none;
    }
    
    /* Mobile container adjustments */
    .prayer-times-container {
        margin: 0 -10px;
    }
    
    .prayer-times {
        padding: 12px 16px;
        border-radius: 0;
        margin-bottom: 0;
        border-bottom: 1px solid #eee;
    }
    
    /* Mobile date meta layout */
    .prayer-times .date-meta {
        min-width: 100px;
        margin-right: 12px;
    }
    
    .prayer-times .date-meta .day-date {
        font-size: 13px;
        margin-bottom: 2px;
    }
    
    .prayer-times .date-meta .sunrise {
        display: flex;
        align-items: center;
        font-size: 11px;
        gap: 4px;
    }
    
    /* Mobile prayer blocks */
    .prayer-times .times-blocks {
        gap: 6px;
    }
    
    .prayer-times .times-blocks .block {
        min-width: 55px;
        padding: 6px 2px;
    }
    
    .prayer-times .times-blocks .block .prayer-title {
        font-size: 10px;
        margin-bottom: 3px;
    }
    
    .prayer-times .times-blocks .block .start {
        font-size: 11px;
        line-height: 1.2;
    }
    
    /* Reduce margins on very small screens */
    @media screen and (max-width: 480px) {
        .prayer-times {
            padding: 10px 12px;
        }
        
        .prayer-times .date-meta {
            min-width: 85px;
            margin-right: 8px;
        }
        
        .prayer-times .times-blocks {
            gap: 4px;
        }
        
        .prayer-times .times-blocks .block {
            min-width: 45px;
            padding: 4px 1px;
        }
        
        .prayer-times .times-blocks .block .start {
            font-size: 10px;
        }
    }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
.prayer-times:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .prayer-times {
        border: 2px solid #000;
    }
    
    .prayer-times#current {
        background: #fffacd;
        border-color: #ff8c00;
    }
    
    .prayer-times.friday {
        background: #e6f3ff;
        border-color: #0066cc;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .prayer-times,
    .prayer-times .times-blocks .block {
        transition: none;
    }
    
    .prayer-times:hover {
        transform: none;
    }
}

/* === PRINT STYLES === */
@media print {
    .prayer-times-container {
        max-width: none;
    }
    
    .prayer-times {
        border: 1px solid #000;
        margin-bottom: 0;
        page-break-inside: avoid;
    }
    
    .prayer-times#current::before,
    .prayer-times.friday::after {
        display: none;
    }
    
    .prayer-times.desktop {
        background: #ccc !important;
        color: #000 !important;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .prayer-times:nth-child(even):not(#current):not(.friday):not(.desktop) {
        background-color: #2a2a2a;
        border-left-color: #444;
    }
    
    .prayer-times:nth-child(odd):not(#current):not(.friday):not(.desktop) {
        background-color: #1e1e1e;
        border-left-color: #333;
    }
    
    .prayer-times .date-meta .day-date,
    .prayer-times .times-blocks .block .start {
        color: #e0e0e0;
    }
    
    .prayer-times .date-meta .sunrise,
    .prayer-times .times-blocks .block .prayer-title {
        color: #b0b0b0;
    }
    
    .prayer-times .times-blocks .block:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* === ANIMATION KEYFRAMES === */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Optional: Add subtle entrance animation */
.prayer-times {
    animation: slideInFromLeft 0.3s ease-out;
}

/* Stagger animation delays */
.prayer-times:nth-child(1) { animation-delay: 0ms; }
.prayer-times:nth-child(2) { animation-delay: 50ms; }
.prayer-times:nth-child(3) { animation-delay: 100ms; }
.prayer-times:nth-child(4) { animation-delay: 150ms; }
.prayer-times:nth-child(5) { animation-delay: 200ms; }

/* === UTILITY CLASSES === */
.prayer-times-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.prayer-times-error {
    background: #ffebee;
    color: #c62828;
    padding: 16px;
    border-radius: 4px;
    text-align: center;
    border-left: 4px solid #f44336;
    margin: 20px 0;
}

.prayer-times-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* === INTEGRATION WITH WORDPRESS THEMES === */
.widget .prayer-times-container {
    margin: 0 -15px;
}

.entry-content .prayer-times-container {
    margin: 20px 0;
}

/* Ensure compatibility with common WordPress theme containers */
.container .prayer-times-container,
.content .prayer-times-container,
.main .prayer-times-container {
    max-width: 100%;
}

/* ============================================================================
   Phase 3 — New widget shortcodes
   [lmc-next-jamaah], [lmc-prayer-card], [lmc-hijri], [lmc-meta-bar]

   Styling is intentionally functional ("good enough" defaults).
   CSS custom properties allow central overrides when the brand kit lands.
   Final design pass happens after Variant.AI brand kit is delivered.
   ============================================================================ */

/* --- Shared token layer ---------------------------------------------------- */
:root {
    --lmc-primary:        #55608f;
    --lmc-primary-dark:   #4a5578;
    --lmc-primary-deeper: #2d3a6b;
    --lmc-on-primary:     #ffffff;
    --lmc-accent:         #d4a027;
    --lmc-alert:          #e63946;
    --lmc-on-alert:       #ffffff;
    --lmc-bg:             #ffffff;
    --lmc-bg-alt:         #f8f9fa;
    --lmc-text:           #1a1a1a;
    --lmc-text-muted:     #666666;
    --lmc-border:         #dee2e6;
    --lmc-radius:         8px;
    --lmc-font-ar:        'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
    --lmc-error-text:     #721c24;
    --lmc-error-bg:       #f8d7da;
    --lmc-error-border:   #f5c6cb;
}

/* ---------------------------------------------------------------------------
 * Per-prayer accent tokens — SCOPED TO THE PRAYER WIDGETS, never global.
 *
 * These were hard-coded hex values in PHP, written onto every card as
 * style="--accent:#6F8FD9". PHP now emits data-prayer="{key}" only and the
 * mapping below turns that into a colour.
 *
 * Scoping is deliberate, for two reasons:
 *   1. The brand system specifies these accents as rail-only, never global.
 *   2. `--accent` is a common token name. Defining it on a bare
 *      [data-prayer] selector would leak it into any theme or block that
 *      uses `--accent` for its own purposes.
 *
 * Override from the page/post editor with no plugin edit — custom properties
 * inherit, so setting a token on the widget or any ancestor is enough:
 *
 *   .lmc-prayer-card-grid { --lmc-prayer-fajr-accent: #123456; }
 *
 * When the site moves to a block theme these become theme.json
 * settings.custom entries and leave this file entirely.
 * ------------------------------------------------------------------------- */
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) {
    --lmc-prayer-fajr-accent:    #6F8FD9;
    --lmc-prayer-fajr-wash:      #E4ECFA;
    --lmc-prayer-sunrise-accent: #E99A3A;
    --lmc-prayer-sunrise-wash:   #FAE9D3;
    --lmc-prayer-zuhr-accent:    #E8B23A;
    --lmc-prayer-zuhr-wash:      #FBEFCE;
    --lmc-prayer-asr-accent:     #3A9FE0;
    --lmc-prayer-asr-wash:       #D6ECF9;
    --lmc-prayer-maghrib-accent: #C96B4A;
    --lmc-prayer-maghrib-wash:   #F4DACF;
    --lmc-prayer-isha-accent:    #6457A9;
    --lmc-prayer-isha-wash:      #DFDBEE;
}

/* data-prayer -> accent. Matches the widget root itself (next-jamaah carries
   the attribute) and any descendant that carries it (the cards, the pill). */
:is(.lmc-prayer-card-grid, .lmc-next-jamaah)[data-prayer="fajr"],
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) [data-prayer="fajr"] {
    --accent:   var(--lmc-prayer-fajr-accent);
    --accent-w: var(--lmc-prayer-fajr-wash);
}
:is(.lmc-prayer-card-grid, .lmc-next-jamaah)[data-prayer="sunrise"],
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) [data-prayer="sunrise"] {
    --accent:   var(--lmc-prayer-sunrise-accent);
    --accent-w: var(--lmc-prayer-sunrise-wash);
}
:is(.lmc-prayer-card-grid, .lmc-next-jamaah)[data-prayer="zuhr"],
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) [data-prayer="zuhr"] {
    --accent:   var(--lmc-prayer-zuhr-accent);
    --accent-w: var(--lmc-prayer-zuhr-wash);
}
:is(.lmc-prayer-card-grid, .lmc-next-jamaah)[data-prayer="asr"],
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) [data-prayer="asr"] {
    --accent:   var(--lmc-prayer-asr-accent);
    --accent-w: var(--lmc-prayer-asr-wash);
}
:is(.lmc-prayer-card-grid, .lmc-next-jamaah)[data-prayer="maghrib"],
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) [data-prayer="maghrib"] {
    --accent:   var(--lmc-prayer-maghrib-accent);
    --accent-w: var(--lmc-prayer-maghrib-wash);
}
:is(.lmc-prayer-card-grid, .lmc-next-jamaah)[data-prayer="isha"],
:is(.lmc-prayer-card-grid, .lmc-next-jamaah) [data-prayer="isha"] {
    --accent:   var(--lmc-prayer-isha-accent);
    --accent-w: var(--lmc-prayer-isha-wash);
}

/* The sprite holds <symbol> defs only — never rendered, but must not occupy
   layout space. Kept here rather than as an inline style on the element. */
.lmc-glyph-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Glyphs now come from an inline <symbol> sprite and inherit currentColor,
   so sizing lives here rather than as width/height attributes in PHP. */
.lmc-glyph { display: block; }
.lmc-glyph[hidden] { display: none; }
.lmc-next-jamaah__glyph-stack .lmc-glyph { width: 100px; height: 100px; }

/* --- [lmc-next-jamaah] ----------------------------------------------------- */
.lmc-next-jamaah {
    background: var(--lmc-primary);
    color: var(--lmc-on-primary);
    border-radius: var(--lmc-radius);
    padding: 1.5rem;
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
}

.lmc-next-jamaah__heading {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    opacity: 0.85;
}

.lmc-next-jamaah__prayer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.lmc-next-jamaah__name-en {
    font-size: 1.5rem;
    font-weight: 700;
}

.lmc-next-jamaah__name-ar {
    font-size: 1.4rem;
    font-family: var(--lmc-font-ar);
    direction: rtl;
    opacity: 0.9;
}

.lmc-next-jamaah__tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.15em 0.45em;
    border-radius: 3px;
    vertical-align: middle;
}

.lmc-next-jamaah__tag--live {
    background: var(--lmc-alert);
    color: var(--lmc-on-alert);
}

.lmc-next-jamaah__tag--tomorrow {
    background: rgba(255,255,255,0.2);
    color: var(--lmc-on-primary);
}

.lmc-next-jamaah__time {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0.5rem 0;
}

.lmc-next-jamaah__countdown {
    display: block;
    font-size: 1rem;
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
}

/* Active/live state */
.lmc-next-jamaah--active {
    background: linear-gradient(135deg, var(--lmc-primary-dark) 0%, var(--lmc-primary-deeper) 100%);
}

/* --- [lmc-prayer-card] ----------------------------------------------------- */
.lmc-prayer-card {
    background: var(--lmc-bg);
    border: 1px solid var(--lmc-border);
    border-radius: var(--lmc-radius);
    padding: 1.25rem;
    max-width: 480px;
    margin: 0 auto;
}

.lmc-prayer-card__heading {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lmc-text-muted);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--lmc-border);
}

.lmc-prayer-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lmc-prayer-card__row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--lmc-bg-alt);
    transition: background 0.15s ease;
}

.lmc-prayer-card__row:last-child {
    border-bottom: none;
}

.lmc-prayer-card__row--current {
    background: rgba(85, 96, 143, 0.08); /* fallback: --lmc-primary (#55608f) at 8% opacity */
    background: color-mix(in srgb, var(--lmc-primary) 8%, transparent);
    border-radius: 4px;
    font-weight: 600;
}

.lmc-prayer-card__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lmc-prayer-card__name-en {
    font-weight: 500;
    color: var(--lmc-text);
}

.lmc-prayer-card__name-ar {
    font-family: var(--lmc-font-ar);
    font-size: 0.9em;
    color: var(--lmc-text-muted);
    direction: rtl;
}

.lmc-prayer-card__begin,
.lmc-prayer-card__jamaah {
    font-variant-numeric: tabular-nums;
    color: var(--lmc-text);
    text-align: right;
    white-space: nowrap;
}

.lmc-prayer-card__jamaah {
    color: var(--lmc-primary);
    font-weight: 600;
}

.lmc-prayer-card__no-jamaah {
    color: var(--lmc-text-muted);
    font-weight: 400;
}

/* --- [lmc-hijri] ----------------------------------------------------------- */
.lmc-hijri {
    display: inline;
    font-style: normal;
}

.lmc-hijri__ar {
    font-family: var(--lmc-font-ar);
    direction: rtl;
    margin-right: 0.25em;
}

/* --- [lmc-meta-bar] -------------------------------------------------------- */
.lmc-meta-bar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--lmc-text-muted);
}

.lmc-meta-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.lmc-meta-bar--centre {
    font-family: var(--lmc-font-ar);
    font-size: 0.9rem;
    direction: rtl;
}

.lmc-meta-bar__separator {
    opacity: 0.5;
}

.lmc-meta-bar__date,
.lmc-meta-bar__hijri {
    font-style: normal;
}

/* --- Shared error state ---------------------------------------------------- */
.lmc-error {
    color: var(--lmc-error-text);
    background: var(--lmc-error-bg);
    border: 1px solid var(--lmc-error-border);
    padding: 0.75rem 1rem;
    border-radius: var(--lmc-radius);
    margin: 1rem 0;
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 480px) {
    .lmc-next-jamaah {
        max-width: 100%;
        padding: 1.25rem 1rem;
    }

    .lmc-next-jamaah__time {
        font-size: 2.5rem;
    }

    .lmc-prayer-card {
        max-width: 100%;
        padding: 1rem 0.75rem;
    }

    .lmc-prayer-card__row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "name begin"
            "name jamaah";
    }

    .lmc-prayer-card__name { grid-area: name; }
    .lmc-prayer-card__begin { grid-area: begin; }
    .lmc-prayer-card__jamaah { grid-area: jamaah; }

    .lmc-meta-bar-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================================
   Prayer Rail — [lmc-next-jamaah] and [lmc-prayer-card] redesign
   Matches Claude Design "Prayer Blocks" component.
   CSS container queries used throughout — adapts to container width,
   not viewport width, so the blocks work in any column layout.
   ============================================================================ */

/* --------------------------------------------------------------------------
   Outer rail wrapper (optional: place [lmc-next-jamaah] + [lmc-prayer-card]
   inside a <div class="lmc-prayer-rail"> for a shared container context).
   Both shortcodes also work as direct containers independently.
   -------------------------------------------------------------------------- */
.lmc-prayer-rail {
    container-type: inline-size;
    width: 100%;
    display: grid;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   Per-prayer accent tokens — scoped to the rail; not promoted to global.
   -------------------------------------------------------------------------- */
.lmc-next-jamaah,
.lmc-prayer-card-grid {
    --pr-fajr:        #6F8FD9; --pr-fajr-w:     #E4ECFA;
    --pr-sunrise:     #E99A3A; --pr-sunrise-w:  #FAE9D3;
    --pr-zuhr:        #E8B23A; --pr-zuhr-w:     #FBEFCE;
    --pr-asr:         #3A9FE0; --pr-asr-w:      #D6ECF9;
    --pr-maghrib:     #C96B4A; --pr-maghrib-w:  #F4DACF;
    --pr-isha:        #6457A9; --pr-isha-w:     #DFDBEE;
    --pr-dark-ink-2:  #BEB2D3;
    --pr-dark-ink-3:  #8B7EAA;
    --pr-ink:         #372262;
    --pr-ink-3:       #7C6E95;
    --pr-card:        #F1ECE2;
    --pr-rule:        #D9D0BD;
    --pr-brand-green: #7FC347;
    --pr-action:      #4A8A3A;
    --pr-action-soft: #6FB04E;
    --pr-cyan-wash:   #CDEBFA;
    --pr-brand-blue:  #1072BA;
}

/* ==========================================================================
   [lmc-next-jamaah] — dark hero card
   ========================================================================== */

.lmc-next-jamaah {
    container-type: inline-size;
    position: relative;
    overflow: hidden;
    background: #372262;
    color: #F8F5EF;
    border-radius: 14px;
    padding: 16px 20px;
}

/* Ambient glyph — absolutely positioned, one visible at a time */
.lmc-next-jamaah__glyph-stack {
    position: absolute;
    right: -10px;
    top: -12px;
    opacity: .14;
    color: #2AAAE2;
    pointer-events: none;
}
.lmc-next-jamaah__glyph-stack .lmc-glyph {
    display: block;
    width: 100px;
    height: 100px;
}
.lmc-next-jamaah__glyph-stack .lmc-glyph[hidden] {
    display: none;
}

/* Top row: eyebrow label + LIVE badge */
.lmc-next-jamaah__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.lmc-next-jamaah__eyebrow {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pr-dark-ink-3);
    font-family: 'Source Sans 3', system-ui, sans-serif;
}

/* LIVE badge with pulsing dot */
.lmc-next-jamaah__live {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--pr-dark-ink-3);
    font-family: 'Source Sans 3', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.lmc-next-jamaah__live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pr-action-soft);
    box-shadow: 0 0 0 3px rgba(111,176,78,.25);
    animation: lmc-pr-pulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes lmc-pr-pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(111,176,78,.25); }
    50%      { box-shadow: 0 0 0 6px rgba(111,176,78,0); }
}

/* Body row: pill icon + prayer name + countdown */
.lmc-next-jamaah__body {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
    position: relative;
}

/* Colored pill holding the prayer's icon */
.lmc-next-jamaah__pill {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-w, rgba(255,255,255,.1));
    color: var(--accent, #fff);
}
.lmc-next-jamaah__pill svg {
    width: 22px;
    height: 22px;
}

/* Prayer name */
.lmc-next-jamaah__name {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    font-weight: 400;
    line-height: 1;
}
.lmc-next-jamaah__name-en {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 34px;
    font-weight: 300;
    letter-spacing: -.02em;
    line-height: 1;
}
.lmc-next-jamaah__name-ar {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: var(--pr-dark-ink-2);
    direction: rtl;
}

/* Countdown + "Until jamāʿah" label */
.lmc-next-jamaah__count {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}
.lmc-next-jamaah__countdown {
    display: block;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 28px;
    color: var(--pr-brand-green);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1;
}
.lmc-next-jamaah__until {
    display: block;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--pr-dark-ink-3);
    margin-top: 4px;
}

/* Container query: narrow */
@container (max-width: 360px) {
    .lmc-next-jamaah__name-en { font-size: 28px; }
    .lmc-next-jamaah__countdown { font-size: 23px; }
    .lmc-next-jamaah__body { flex-wrap: wrap; gap: 10px; }
    .lmc-next-jamaah__count { margin-left: 0; text-align: left; flex-basis: 100%; }
}
/* Container query: wide */
@container (min-width: 640px) {
    .lmc-next-jamaah { padding: 20px 26px; }
    .lmc-next-jamaah__name-en { font-size: 40px; }
    .lmc-next-jamaah__countdown { font-size: 34px; }
}

/* ==========================================================================
   [lmc-prayer-card] — 6-card prayer grid
   ========================================================================== */

.lmc-prayer-card-grid {
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* 6-across on wide containers */
@container (min-width: 640px) {
    .lmc-prayer-card-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
/* 2-up on very narrow */
@container (max-width: 300px) {
    .lmc-prayer-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Individual card */
.lmc-prayer-card {
    position: relative;
    background: var(--pr-card, #F1ECE2);
    border-radius: 14px;
    padding: 14px 10px 12px;
}

/* Active / next prayer */
.lmc-prayer-card--today {
    background: #fff;
    box-shadow: 0 0 0 1.5px var(--pr-brand-green) inset;
}

/* Sunrise: no jamāʿah, dashed border */
.lmc-prayer-card--no-jamaah {
    background: transparent;
    border: 1.5px dashed var(--pr-rule, #D9D0BD);
}
.lmc-prayer-card--no-jamaah.lmc-prayer-card--today {
    background: #fff;
    border: 1.5px solid var(--pr-brand-green);
}

/* Card header row: icon chip + prayer abbr */
.lmc-prayer-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* Accent-coloured circular icon chip */
.lmc-prayer-card__chip {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-w, #eee);
    color: var(--accent, #555);
    flex-shrink: 0;
}
.lmc-prayer-card__chip svg {
    width: 14px;
    height: 14px;
}

/* Prayer abbreviation */
.lmc-prayer-card__label {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pr-ink-3);
    white-space: nowrap;
}

/* Adhan (begin) time — the large display time */
.lmc-prayer-card__adhan {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    color: var(--pr-ink);
    font-weight: 500;
    letter-spacing: -.01em;
    margin-bottom: 6px;
    line-height: 1;
    display: block;
}

/* Jamāʿah pill */
.lmc-prayer-card__jamaah-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--pr-cyan-wash);
    color: var(--pr-brand-blue);
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .06em;
    font-weight: 500;
}
.lmc-prayer-card--today .lmc-prayer-card__jamaah-pill {
    background: rgba(127,195,71,.22);
    color: var(--pr-action);
}

/* "Begins HH:MM" label for sunrise (no jamāʿah) */
.lmc-prayer-card__begins {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 10px;
    color: var(--pr-ink-3);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Wide container: slightly larger cards */
@container (min-width: 640px) {
    .lmc-prayer-card { padding: 16px 12px 14px; }
    .lmc-prayer-card__adhan { font-size: 24px; }
}
