/* Quran Pro Tafseer Styles */

.quran-tafseer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quran-tafseer-modal.active {
    opacity: 1;
    visibility: visible;
}

.quran-tafseer-modal.hidden {
    display: none;
}

.quran-tafseer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.quran-tafseer-content {
    position: relative;
    z-index: 2;
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e5e7eb;
}

.quran-tafseer-modal.active .quran-tafseer-content {
    transform: scale(1);
}

.quran-tafseer-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 16px 16px 0 0;
}

.quran-tafseer-title {
    font-family: 'Amiri', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #065f46; /* Emerald 800 */
    margin: 0;
}

.quran-tafseer-controls {
    display: flex;
    gap: 0.5rem;
}

.quran-tafseer-btn, .quran-tafseer-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quran-tafseer-btn:hover, .quran-tafseer-close:hover {
    background: #f3f4f6;
    color: #059669;
    border-color: #d1fae5;
}

.quran-tafseer-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.quran-tafseer-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
}

.quran-tafseer-text {
    font-family: 'Amiri', serif;
    line-height: 2;
    color: #1f2937;
    text-align: justify;
}

.quran-tafseer-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #059669;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

#quran-tafseer-loading {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
}

.quran-tafseer-error {
    text-align: center;
    color: #dc2626;
    padding: 2rem;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fee2e2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar */
.quran-tafseer-body::-webkit-scrollbar {
    width: 8px;
}

.quran-tafseer-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.quran-tafseer-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.quran-tafseer-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.quran-tafseer-hidden {
    display: none !important;
}
