/* ==============================================
   Anasi Subject Tabs — Stylesheet v1.0.0
   Direction: RTL
   ============================================== */

.anasi-tabs {
    direction: rtl;
    font-family: inherit;
    margin: 24px 0;
}

/* ── Tab Buttons Row ───────────────────────── */
.anasi-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.anasi-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #555;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    margin-bottom: -2px;
    font-family: inherit;
}

.anasi-tab-btn:hover:not(:disabled) {
    color: #0073aa;
    background: #f0f7ff;
}

.anasi-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background: #f0f7ff;
}

.anasi-tab-btn:disabled {
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.6;
}

.anasi-tab-btn .anasi-tab-icon {
    font-size: 18px;
    line-height: 1;
}

/* ── Tab Content Panels ─────────────────────── */
.anasi-tab-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    padding: 24px;
    min-height: 200px;
}

.anasi-tab-panel {
    display: none;
    animation: anasiFadeIn 0.25s ease;
}

.anasi-tab-panel.active {
    display: block;
}

@keyframes anasiFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── PDF Panel ──────────────────────────────── */
.anasi-pdf-frame {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 4px;
    display: block;
}

.anasi-pdf-fallback {
    text-align: center;
    padding: 40px 20px;
    color: #555;
}

.anasi-pdf-fallback a {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.anasi-pdf-fallback a:hover { background: #005f8e; }

/* ── Infographic Panel ──────────────────────── */
.anasi-infographic-wrap {
    text-align: center;
}

.anasi-infographic-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* ── Article Panel ──────────────────────────── */
.anasi-article-body {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.anasi-article-body h2,
.anasi-article-body h3 {
    margin-top: 24px;
    margin-bottom: 8px;
    color: #111;
}

.anasi-article-body p { margin-bottom: 14px; }

.anasi-article-body ul,
.anasi-article-body ol {
    padding-right: 20px;
    margin-bottom: 14px;
}

/* ── Video Panel ────────────────────────────── */
.anasi-video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.anasi-video-wrap iframe,
.anasi-video-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Empty State ────────────────────────────── */
.anasi-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #999;
    font-size: 15px;
}

.anasi-empty-state .anasi-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 600px) {
    .anasi-tab-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .anasi-tab-content {
        padding: 16px;
    }

    .anasi-pdf-frame {
        height: 420px;
    }
}
