/* ============================================
   AYAAT SECTION - Compact Unified Design
   ============================================ */

.ayaat-section {
    padding: 30px 0 40px;
    background: #fafbfc;
}

.ayaat-list {
    max-width: 100%;
    margin: 0 auto;
}

/* Compact Ayah Card - All in One */
.ayah-card {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px 25px;
    overflow: hidden;
    border: 1px solid rgba(0, 76, 112, 0.08);
    box-shadow: 0 2px 12px rgba(0, 76, 112, 0.04);
    transition: all 0.3s ease;
}

.ayah-card:hover {
    box-shadow: 0 4px 20px rgba(0, 76, 112, 0.08);
    border-color: rgba(0, 76, 112, 0.15);
}

/* Arabic Text - Compact */
.ayah-arabic {
    color: #1e293b;
    font-size: 2.5em;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

/* Hide border when translations are hidden */
.ayah-translations[style*="display: none"]+.ayah-actions .ayah-arabic,
.ayah-translations[style*="display:none"]+.ayah-actions .ayah-arabic,
.ayah-card:has(.ayah-translations[style*="display: none"]) .ayah-arabic,
.ayah-card:has(.ayah-translations[style*="display:none"]) .ayah-arabic {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Alternative approach - when only Arabic is visible */
.ayah-arabic:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.ayah-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /*background: #004c70;
    color: #ffffff;*/
    font-size: 0.50em;
    font-weight: 600;
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    margin: 0 8px;
    padding: 3px;
    /*box-shadow: 0 2px 8px rgba(0, 76, 112, 0.2);*/
}

/* Translations - Side by Side */
.ayah-translations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.trans-col {
    font-size: 1em;
    line-height: 1.7;
    color: #334155;
}

.trans-eng {
    padding-right: 15px;
    border-right: 1px solid #e2e8f0;
}

.trans-ur {
    direction: rtl;
    text-align: right;
    font-size: 1.35em;
    line-height: 1.65;
    color: #1e293b;
    padding-left: 15px;
}

/* Actions Row - Audio and Link */
.ayah-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.ayah-audio-player {
    flex: 1;
    max-width: 450px;
}

.ayah-audio-player audio {
    width: 100%;
    height: 35px;
    border-radius: 6px;
    outline: none;
}

.ayah-link {
    flex-shrink: 0;
}

.ayah-link a {
    color: #004c70;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ayah-link a:hover {
    color: #003d5c;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .ayah-arabic {
        font-size: 2em;
        line-height: 1.75;
    }

    .ayah-translations {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .trans-eng {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 12px;
    }

    .trans-ur {
        padding-left: 0;
        padding-top: 12px;
    }
}

@media (max-width: 768px) {
    .ayaat-section {
        padding: 20px 0 30px;
    }

    .ayah-card {
        margin-bottom: 15px;
        padding: 15px 18px;
        border-radius: 10px;
    }

    .ayah-arabic {
        font-size: 2.4em;
        line-height: 1.7;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .ayah-num {
        min-width: 30px;
        height: 30px;
        font-size: 0.42em;
    }

    .ayah-translations {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .trans-col {
        font-size: 0.95em;
        line-height: 1.65;
    }

    .trans-ur {
        font-size: 1.25em;
    }

    .ayah-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ayah-audio-player {
        max-width: 100%;
    }

    .ayah-link {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ayah-card {
        padding: 12px 15px;
    }

    .ayah-arabic {
        font-size: 2.2em;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .trans-col {
        font-size: 0.9em;
    }

    .trans-ur {
        font-size: 1.15em;
    }

    .ayah-audio-player audio {
        height: 32px;
    }
}

/* ============================================
   Ayat Detail Enhancements (match Surah page)
   ============================================ */
.ayah-detail-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.ayah-nav-btn {
    background: #ffffff;
    color: #004c70;
    border: 1px solid rgba(0, 76, 112, 0.18);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88em;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 76, 112, 0.08);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ayah-nav-btn:hover {
    color: #003d5c;
    border-color: rgba(0, 76, 112, 0.28);
    box-shadow: 0 10px 24px rgba(0, 76, 112, 0.12);
}

.ayah-detail-card {
    border: 1px solid rgba(0, 76, 112, 0.12);
}

.ayah-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ayah-chip {
    background: #e2e8f0;
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82em;
    letter-spacing: 0.2px;
}

.detail-accordion {
    margin-top: 22px;
}

.detail-accordion-title {
    font-weight: 800;
    font-size: 1em;
    color: #0f172a;
    margin: 0 0 10px 0;
    letter-spacing: 0.2px;
}

.modern-accordion .panel {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 76, 112, 0.04);
    margin-bottom: 12px;
    overflow: hidden;
}

.modern-accordion .panel-heading {
    background: #f8fafc;
    padding: 8px 12px;
}

.modern-accordion .panel-title a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95em;
    text-decoration: none;
}

.modern-accordion .panel-title a:hover {
    text-decoration: none;
    color: #003d5c;
}

.modern-accordion .panel-body {
    padding: 10px 12px;
    font-size: 1em;
    line-height: 1.7;
    color: #334155;
}

@media (max-width: 768px) {
    .ayah-detail-nav {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
    }

    .ayah-nav-btn {
        flex: 0 0 auto;
        width: auto;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.82em;
    }

    .ayah-meta-row {
        gap: 6px;
    }

    .ayah-chip {
        font-size: 0.78em;
    }
}

/* Floating Font Size Controls */
.font-controls {
    position: fixed;
    top: auto;
    bottom: 30px;
    left: 20px;
    right: auto;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 76, 112, 0.15);
    border: 1px solid rgba(0, 76, 112, 0.1);
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.control-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 5px 2px;
}

.font-controls:hover {
    box-shadow: 0 8px 25px rgba(0, 76, 112, 0.2);
    transform: translateY(-2px);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.group-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: center;
    letter-spacing: 0.5px;
}

.group-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.scroll-group .group-label {
    color: #0d9488;
    /* Teal for scroll */
}

.font-group .group-label {
    color: #004c70;
    /* Brand Blue for font */
}

.font-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
}

.scroll-play-btn {
    width: 42px;
    height: 42px;
    background: #f0fdfa;
    border-color: #0d9488;
    color: #0d9488;
    font-size: 16px;
    box-shadow: 0 3px 8px rgba(13, 148, 136, 0.12);
}

.scroll-play-btn:hover {
    background: #0d9488 !important;
    border-color: #0d9488 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 15px rgba(13, 148, 136, 0.25) !important;
}

.font-btn:hover {
    background: #004c70;
    color: white;
    border-color: #004c70;
    transform: scale(1.05);
}

.font-btn:active {
    transform: scale(0.95);
}

/* Mobile: Bottom Right */
@media (max-width: 768px) {
    .font-controls {
        top: auto;
        bottom: 30px;
        left: 20px;
        right: auto;
        flex-direction: row;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
        max-width: 90vw;
        overflow-x: auto;
        align-items: center;
    }

    .group-label {
        display: none;
        /* Hide labels on mobile to save space */
    }

    .group-buttons {
        flex-direction: row;
        gap: 6px;
    }

    .font-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .scroll-play-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .control-divider {
        width: 1px;
        height: 20px;
        margin: 0 10px;
    }
}