/* IBM Plex Sans Arabic (SIL OFL): the font of the admin panel, the landing pages and the mobile app. */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:is(.page-content-editor .tiptap, .page-content-display.fi-prose) {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1.125rem;
    line-height: 1.95;
    text-align: start;
    overflow-wrap: anywhere;
    max-width: 65rem;
    margin-inline: auto;
    width: 100%;
}

:is(.page-content-editor .tiptap, .page-content-display.fi-prose) [style*="font-family"] {
    /* Pages saved before the font change carry an inline Dubai. */
    font-family: inherit !important;
}

:is(.page-content-editor .tiptap, .page-content-display.fi-prose) :is(h1, h2, h3) {
    font-family: inherit;
    color: #157018;
    font-weight: 700;
    line-height: 1.5;
    margin-block: 1.5em .65em;
}

:is(.page-content-editor .tiptap, .page-content-display.fi-prose) h2 { font-size: 1.75rem; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) h3 { font-size: 1.35rem; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) p { margin-block: 0 1em; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) :is(strong, b) { color: inherit; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) a { color: #157018; text-decoration: underline; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) hr { border: 0; border-top: 3px solid #157018; margin-block: 1.75em; }

/* Standard blockquotes remain editable and readable by the mobile HTML renderer. */
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote {
    background: #f3faf3;
    color: #374151;
    border: 1px solid #157018;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-block: 1.5rem;
    font-style: normal;
    line-height: 1.5;
    quotes: none;
}

/* Override paragraph spacing in older saved HTML as well as in the editor. */
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote > p { margin: 0 0 6px !important; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote > :is(h2, h3) { margin: 0 0 10px !important; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote > :first-child { margin-top: 0; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote > :last-child { margin-bottom: 0 !important; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote p::before,
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote p::after { content: none; }
:is(.page-content-editor .tiptap, .page-content-display.fi-prose) .color { color: var(--color); }

.dark :is(.page-content-editor .tiptap, .page-content-display.fi-prose) :is(h1, h2, h3, a) { color: #86d68b; }
.dark :is(.page-content-editor .tiptap, .page-content-display.fi-prose) blockquote { background: #162b1c; color: #e5e7eb; }
.dark :is(.page-content-editor .tiptap, .page-content-display.fi-prose) .color { color: var(--dark-color, var(--color)); }
