/*
 * Dar-ul-Ifta Al-Bayan Peshawar
 * Mixed Urdu / Arabic typography
 *
 * Urdu remains inherited Nastaleeq.
 * Arabic spans use a dedicated Naskh font.
 */

@font-face {
    font-family: "DAB Naskh Arabic";
    src: url("../fonts/NotoNaskhArabic-Regular.eeff65bdd1ad.ttf")
         format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.dab-inline-arabic[lang="ar"] {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Scheherazade New",
        "Traditional Arabic",
        serif !important;

    direction: rtl;
    unicode-bidi: isolate;
    font-style: normal;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

/*
 * Public Fatwa question.
 */
.fatwa-detail-page
.question-content
.dab-inline-arabic[lang="ar"] {
    font-size: 1.08em;
    line-height: 1.9;
}

/*
 * Staff Fatwa Editor original-question display.
 */
.full-question-text
.dab-inline-arabic[lang="ar"] {
    font-size: 1.08em;
    line-height: 1.9;
}

/* =========================================================
   DAB REFERENCE ARABIC TYPOGRAPHY V2.1
   Reference prose remains Urdu/Nastaleeq.
   Explicit or safely detected Arabic spans use Naskh.
   ========================================================= */

.fatwa-block-reference
.dab-inline-arabic[lang="ar"],
.fatwa-reference
.dab-inline-arabic[lang="ar"] {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Scheherazade New",
        "Traditional Arabic",
        serif !important;

    font-size: 1.08em;
    font-style: normal;
    font-weight: 400;
    direction: rtl;
    unicode-bidi: isolate;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

/* =========================================================
   DAB PROFESSIONAL ARABIC EDITOR TOOL V2.2B
   Editor-only authoring controls.
   Rendering remains controlled by semantic Arabic spans.
   ========================================================= */

.dab-arabic-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.dab-arabic-mark-button {
    appearance: none;
    border: 1px solid #b8a16a;
    border-radius: 8px;
    background: #fffaf0;
    color: #5d491e;
    cursor: pointer;
    padding: 7px 14px;
    font: inherit;
    line-height: 1.5;
}

.dab-arabic-mark-button:hover,
.dab-arabic-mark-button:focus-visible {
    border-color: #8f7438;
    background: #f8efd9;
    outline: none;
}

.dab-arabic-tool-help,
.dab-arabic-tool-status {
    font-size: 0.92em;
    line-height: 1.7;
}

.dab-arabic-tool-help {
    opacity: 0.78;
}

.dab-arabic-tool-status {
    font-weight: 600;
}

.dab-block-edit {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dab-block-edit > summary {
    width: fit-content;
    cursor: pointer;
    font-weight: 700;
}

.dab-block-edit-form {
    margin-top: 14px;
}

.dab-block-edit-form textarea {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .dab-arabic-editor-toolbar {
        align-items: stretch;
    }

    .dab-arabic-mark-button {
        width: 100%;
    }
}


/* ==================================================================
   DAB UNIFIED ARABIC TYPOGRAPHY - GATE 3
   Staff Arabic evidence + public fatwa Arabic evidence
   Use the project-owned local Noto Naskh Arabic font.
   Urdu/Nastaliq typography remains untouched.
   ================================================================== */

.arabic-evidence[lang="ar"],
.fatwa-detail-page .fatwa-block-arabic[lang="ar"] {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;
}

/*
 * ============================================================
 * DAB BINORIA-STYLE TYPOGRAPHY - GATE 7A
 *
 * Urdu prose / answer:
 *   inherited Jameel Noori Nastaleeq
 *
 * Arabic evidence:
 *   DAB Naskh Arabic
 *
 * References / Hawala:
 *   DAB Naskh Arabic
 * ============================================================
 */

/* Professional Arabic evidence */
.arabic-evidence[lang="ar"],
.fatwa-detail-page .fatwa-block-arabic[lang="ar"] {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;
}

/*
 * Professional reference typography.
 * "حوالہ:" and the complete citation inherit Naskh.
 */
.fatwa-reference,
.fatwa-reference strong,
.fatwa-reference .dab-inline-arabic {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;
}

/* Public structured reference block */
.fatwa-detail-page .fatwa-block-reference {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;
}

/*
 * Staff editor:
 * when the existing block itself is Reference,
 * its textarea uses the same professional Naskh face.
 * Editor labels/buttons remain Urdu/Nastaliq.
 */
.fatwa-block-reference textarea {
    font-family:
        "DAB Naskh Arabic",
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;
}

/* Comfortable scholarly Arabic/reference reading */
.arabic-evidence[lang="ar"],
.fatwa-reference,
.fatwa-detail-page .fatwa-block-arabic[lang="ar"],
.fatwa-detail-page .fatwa-block-reference {
    line-height: 2;
}
