/* AL HAITHAM V2 — DESIGN SYSTEM */

@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700&display=swap");

:root {
    color-scheme: light;

    --color-primary: #0c92b3;
    --color-primary-hover: #087d9a;
    --color-primary-soft: #e5f6fa;
    --color-secondary: #20b7ad;

    --color-bg: #f5f9fb;
    --color-surface: #ffffff;
    --color-surface-alt: #eaf4f7;
    --color-text: #143649;
    --color-muted: #66808e;
    --color-border: #dceaf0;

    --color-success: #168b69;
    --color-danger: #c74e55;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-soft: 0 14px 40px rgba(17, 67, 89, .07);
    --shadow-lift: 0 22px 55px rgba(17, 67, 89, .13);

    --motion-fast: 180ms;
    --motion-normal: 260ms;
    --motion-slow: 450ms;

    --ease-standard: cubic-bezier(.22, 1, .36, 1);

    --font-ar: "IBM Plex Sans Arabic", Tahoma, sans-serif;
    --font-en: "Inter", Arial, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --color-primary: #54c6e5;
    --color-primary-hover: #83d9f0;
    --color-primary-soft: #173f51;
    --color-secondary: #4dd6c8;

    --color-bg: #0d1d27;
    --color-surface: #172c38;
    --color-surface-alt: #1d3744;
    --color-text: #edf8fb;
    --color-muted: #adc4cf;
    --color-border: #304b59;

    --color-success: #5cdbaf;
    --color-danger: #ff8c94;

    --shadow-soft: 0 14px 40px rgba(0, 0, 0, .15);
    --shadow-lift: 0 22px 55px rgba(0, 0, 0, .23);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--color-bg);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-ar);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    transition:
        background var(--motion-normal),
        color var(--motion-normal);
}

html[lang="en"] body {
    font-family: var(--font-en);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
}

.v2-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    gap: 9px;
    padding: 11px 25px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition:
        transform var(--motion-fast) var(--ease-standard),
        background var(--motion-fast),
        box-shadow var(--motion-fast);
}

.v2-button:hover {
    transform: translateY(-2px);
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-soft);
}

.v2-icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    color: var(--color-text);
    transition:
        transform var(--motion-fast),
        background var(--motion-fast),
        border-color var(--motion-fast);
}

.v2-icon-button:hover {
    transform: translateY(-2px);
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Approved fonts: shared by public and staff pages. */
html[data-clinic-font="cairo"] { --font-ar: "Cairo", Tahoma, sans-serif; }
html[data-clinic-font="tajawal"] { --font-ar: "Tajawal", Tahoma, sans-serif; }
html[data-clinic-font="plex"] { --font-ar: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
