﻿/* =========================================================
   MOH Theme (aligned to MOH identity guide)
   Primary:   #008755 (Green)  | Secondary: #9B945F (Gold-ish)
========================================================= */

:root {
    --moh-primary: #008755;
    --moh-secondary: #9b945f;
    --moh-gray: #707372;
    --moh-blue: #009ACE;
    --moh-teal: #64CCC9;
    --moh-red: #C8102E;
    --moh-orange: #DC582A;
    --moh-amber: #F0B323;
    --moh-yellow: #F2CD00;
    --moh-lime: #D0DF00;
    --moh-bg: #f7faf8;
    --moh-card: #ffffff;
    --moh-text: #0f172a;
    --moh-muted: #64748b;
    --moh-border: rgba(15, 23, 42, .10);
    --moh-radius: 16px;
    --moh-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

/* Base (keep site LTR globally; content switches with .moh-content dir) */
.moh-body {
    background: var(--moh-bg);
    color: var(--moh-text);
    font-family: "Helvetica Neue","Segoe UI",Arial,sans-serif;
}

/* Arabic helper (use only where needed) */
.moh-ar {
    font-family: "GE SS Unique","Hassoub","Tahoma","Arial",sans-serif;
    direction: rtl;
    unicode-bidi: plaintext;
}

/* Content wrapper: switches direction per page */
.moh-content[dir="rtl"] {
    font-family: "GE SS Unique","Hassoub","Tahoma","Arial",sans-serif;
    text-align: right;
}

.moh-content[dir="ltr"] {
    text-align: left;
}

/* Keep list bullets aligned with content direction */
.moh-content[dir="rtl"] ul,
.moh-content[dir="rtl"] ol {
    padding-right: 1.25rem;
    padding-left: 0;
}

.moh-content[dir="ltr"] ul,
.moh-content[dir="ltr"] ol {
    padding-left: 1.25rem;
    padding-right: 0;
}

/* Header / brand (always LTR) */
.moh-topbar {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.moh-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.moh-brand-primary {
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.1;
}

.moh-brand-secondary {
    color: var(--moh-muted);
    font-size: .95rem;
    line-height: 1.2;
}

.moh-swoosh {
    position: absolute;
    inset: 0 0 auto auto;
    width: 420px;
    height: 120px;
    pointer-events: none;
    background: radial-gradient(120% 120% at 100% 0%, rgba(0,135,85,.20) 0%, rgba(0,135,85,0) 55%), radial-gradient(120% 120% at 90% 10%, rgba(155,148,95,.22) 0%, rgba(155,148,95,0) 60%), linear-gradient(135deg, rgba(0,135,85,.10), rgba(155,148,95,.10));
    clip-path: ellipse(85% 120% at 100% 0);
}

/* Navbar */
.moh-navbar {
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, .06);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

    .moh-navbar .nav-link {
        color: var(--moh-text);
        border-radius: 999px;
        padding: .45rem .8rem;
        transition: background-color .15s ease, color .15s ease;
        line-height: 1.15;
    }

        .moh-navbar .nav-link:hover {
            background: rgba(0,135,85,.08);
            color: var(--moh-primary);
        }

        .moh-navbar .nav-link.active {
            background: rgba(0,135,85,.12);
            color: var(--moh-primary);
            font-weight: 700;
        }

/* Secondary line inside nav items (bilingual) */
.nav-sub {
    display: block;
    font-size: .78rem;
    color: var(--moh-muted);
    margin-top: .15rem;
    line-height: 1.15;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 18px 40px rgba(15,23,42,.10);
}

.dropdown-item:active {
    background: rgba(0,135,85,.12);
    color: var(--moh-primary);
}

/* Search */
.moh-search {
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    padding-inline: .9rem;
}

/* Cards */
.moh-card {
    background: var(--moh-card);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--moh-radius);
    box-shadow: var(--moh-shadow);
}

    .moh-card .card-header {
        background: transparent;
        border-bottom: 1px solid rgba(15, 23, 42, .06);
        font-weight: 800;
        padding: .85rem 1rem;
        position: relative;
    }

        .moh-card .card-header::before {
            content: "";
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 18px;
            border-radius: 2px;
            background: var(--moh-secondary);
        }

/* Alerts */
.moh-alert {
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.08);
}

/* Buttons */
.btn-moh {
    background: var(--moh-primary);
    border: 1px solid var(--moh-primary);
    color: #fff;
    border-radius: 14px;
    padding: .55rem 1rem;
    font-weight: 700;
}

    .btn-moh:hover {
        background: #007a4c;
        border-color: #007a4c;
        color: #fff;
    }

.btn-moh-outline {
    background: transparent;
    border: 1px solid rgba(0,135,85,.35);
    color: var(--moh-primary);
    border-radius: 14px;
    padding: .55rem 1rem;
    font-weight: 700;
}

    .btn-moh-outline:hover {
        background: rgba(0,135,85,.08);
        border-color: rgba(0,135,85,.55);
    }

/* Home tiles */
.moh-tile {
    display: block;
    text-decoration: none;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    color: inherit;
}

    .moh-tile:hover {
        transform: translateY(-2px);
        border-color: rgba(0,135,85,.35);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .10);
    }

.moh-tile-title {
    font-weight: 900;
    color: var(--moh-primary);
    margin-bottom: .25rem;
}

/* Code panel */
.moh-codepanel {
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.moh-codepanel-hd {
    padding: 10px 12px;
    background: #f7f9fb;
    border-bottom: 1px solid #eef2f7;
}

.moh-codepanel-body {
    margin: 0;
    padding: 12px;
    background: #0b1220;
    color: #e6edf3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .85rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

    .moh-codepanel-body code {
        color: inherit;
    }

/* Footer */
.moh-footer {
    background: #fff;
}

.moh-footer-links {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.moh-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--moh-secondary);
    display: inline-block;
}

/* Responsive tweak: reduce swoosh on small screens */
@media (max-width: 576px) {
    .moh-swoosh {
        width: 260px;
        height: 90px;
    }

    .moh-logo {
        width: 44px;
        height: 44px;
    }

    .moh-brand-secondary {
        font-size: .85rem;
    }
}
.diagram-toolbar .btn {
    border-radius: 999px;
    line-height: 1;
    padding: .25rem .55rem;
}

.diagram-viewport {
    overflow: auto;
    border-radius: 10px;
    /* optional: control how tall the viewport is */
    max-height: 360px;
}

.diagram-stage {
    display: inline-block;
    transform-origin: 50% 50%;
    /* default zoom */
    transform: scale(1);
}