/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * CSS VARIABLES - UNIFIED DESIGN SYSTEM
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *
 * فایل مرکزی متغیرهای CSS برای کل پروژه doktor.vip
 * تمام متغیرها در یک مکان برای جلوگیری از تکرار
 *
 * @version 1.1.0
 * @date 2025-12-03
 * @compliant style-guide.md + design-principles.md
 * @updated Added @font-face definition for Firefox compatibility
 */

/* ═══════════════════════════════════════════════════════════════════
   FONT FACE DEFINITION - IRANSans Variable Font
   Must be defined before :root for proper loading
   ═══════════════════════════════════════════════════════════════════ */
@font-face {
    font-family: 'iransansxv';
    src: url('/theme/fonts/IRANSansXV.woff2') format('woff2-variations'),
         url('/theme/fonts/IRANSansXV.woff2') format('woff2'),
         url('/theme/fonts/IRANSansXV.woff') format('woff');
    font-weight: 100 900;
    font-stretch: 100%;
    font-style: normal;
    font-display: swap;
    /* Unicode range for Persian, Arabic and Latin characters */
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE80-FEFC, U+0000-00FF;
}

:root {
    /* ═══════════════════════════════════════════════════════════════════
       1. PRIMARY BRAND COLORS
       ═══════════════════════════════════════════════════════════════════ */
    --primary-color: rgb(37, 60, 137);
    --primary-hover: rgb(30, 48, 110);
    --primary-dark: rgb(25, 40, 92);
    --primary-light: rgb(229, 233, 244);
    --secondary-color: #0fb1c7;
    --accent-color: #ffe5a4;

    /* ═══════════════════════════════════════════════════════════════════
       2. TEXT COLORS
       ═══════════════════════════════════════════════════════════════════ */
    --text-primary: #000000;
    --text-secondary: #222222;
    --text-muted: #717171;
    --text-disabled: #B0B0B0;
    --text-white: #FFFFFF;

    /* ═══════════════════════════════════════════════════════════════════
       3. BACKGROUND COLORS
       ═══════════════════════════════════════════════════════════════════ */
    --bg-primary: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    --bg-component: #FFFFFF;
    --bg-disabled: rgb(249, 250, 251);
    --bg-hover: #F7F7F7;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* ═══════════════════════════════════════════════════════════════════
       4. NEUTRAL GRAY SCALE
       ═══════════════════════════════════════════════════════════════════ */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #717171;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #222222;
    --gray-900: #000000;

    /* ═══════════════════════════════════════════════════════════════════
       5. STATUS COLORS
       ═══════════════════════════════════════════════════════════════════ */
    --success: #00A699;
    --success-light: #E6F7F5;
    --success-bg: #E6F7F5;
    --success-border: #B3E5DF;
    --success-dark: #007368;

    --warning: #FFB400;
    --warning-light: #FEF6EE;
    --warning-bg: #FEF6EE;
    --warning-border: #FFD89B;
    --warning-dark: #CC8F00;

    --error: #DC2626;
    --error-light: #FEF3F2;
    --error-bg: #FEF3F2;
    --error-border: #FEE2E2;
    --error-dark: #B91C1C;

    --info: #008489;
    --info-light: #E6F4F5;

    --star-color: #FFB400;

    /* ═══════════════════════════════════════════════════════════════════
       6. BORDER COLORS
       ═══════════════════════════════════════════════════════════════════ */
    --border-light: #DDDDDD;
    --border-default: #B0B0B0;
    --border-dark: #717171;

    /* ═══════════════════════════════════════════════════════════════════
       7. SHADOWS
       ═══════════════════════════════════════════════════════════════════ */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

    /* ═══════════════════════════════════════════════════════════════════
       8. TYPOGRAPHY
       ═══════════════════════════════════════════════════════════════════ */
    --font-primary: 'iransansxv', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'iransansxv', 'tahoma', sans-serif;

    /* Font Sizes */
    --font-xs: 0.75rem;       /* 12px */
    --font-sm: 0.875rem;      /* 14px */
    --font-base: 1rem;        /* 16px */
    --font-lg: 1.125rem;      /* 18px */
    --font-xl: 1.25rem;       /* 20px */
    --font-2xl: 1.5rem;       /* 24px */
    --font-3xl: 1.875rem;     /* 30px */
    --font-4xl: 2.25rem;      /* 36px */
    --font-5xl: 3rem;         /* 48px */
    --font-6xl: 4rem;         /* 64px */

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;

    /* ═══════════════════════════════════════════════════════════════════
       9. SPACING (8px Base Unit)
       ═══════════════════════════════════════════════════════════════════ */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 48px;
    --spacing-4xl: 64px;
    --spacing-5xl: 96px;

    /* ═══════════════════════════════════════════════════════════════════
       10. BORDER RADIUS
       ═══════════════════════════════════════════════════════════════════ */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* ═══════════════════════════════════════════════════════════════════
       10.5. ICON SIZES
       ═══════════════════════════════════════════════════════════════════ */
    --icon-xs: 16px;
    --icon-sm: 20px;
    --icon-md: 24px;
    --icon-lg: 32px;
    --icon-xl: 48px;

    /* ═══════════════════════════════════════════════════════════════════
       11. TRANSITIONS
       ═══════════════════════════════════════════════════════════════════ */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;

    /* ═══════════════════════════════════════════════════════════════════
       12. CONTAINER WIDTHS
       ═══════════════════════════════════════════════════════════════════ */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;

    /* ═══════════════════════════════════════════════════════════════════
       13. Z-INDEX SCALE
       ═══════════════════════════════════════════════════════════════════ */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1070;
    --z-loader: 9999;

    /* ═══════════════════════════════════════════════════════════════════
       14. HEADER SPECIFIC
       ═══════════════════════════════════════════════════════════════════ */
    --header-height-desktop: 72px;
    --header-height-mobile: 64px;
    --header-sidebar-width: 320px;
    --header-z-index-header: 1022;
    --header-z-index-sidebar: 10001;
    --header-z-index-overlay: 1021;
    --header-z-index-dropdown: 10002;

    /* Header Colors (with prefix for backward compatibility) */
    --header-primary-color: rgb(37, 60, 137);
    --header-primary-hover: rgb(30, 48, 110);
    --header-primary-dark: rgb(25, 40, 92);
    --header-primary-light: rgb(229, 233, 244);
    --header-text-primary: #000000;
    --header-text-secondary: #222222;
    --header-text-muted: #717171;
    --header-text-disabled: #B0B0B0;
    --header-text-white: #FFFFFF;
    --header-bg-primary: rgba(255, 255, 255, 0.98);
    --header-bg-scroll: rgba(255, 255, 255, 0.95);
    --header-bg-component: #FFFFFF;
    --header-bg-hover: #F7F7F7;
    --header-bg-disabled: rgb(249, 250, 251);
    --header-bg-overlay: rgba(0, 0, 0, 0.5);
    --header-gray-50: #F9FAFB;
    --header-gray-100: #F3F4F6;
    --header-gray-200: #E5E7EB;
    --header-gray-300: #D1D5DB;
    --header-gray-400: #9CA3AF;
    --header-gray-500: #717171;
    --header-gray-600: #4B5563;
    --header-gray-700: #374151;
    --header-gray-800: #222222;
    --header-gray-900: #000000;
    --header-success: #00A699;
    --header-warning: #FFB400;
    --header-error: #DC2626;
    --header-info: #008489;
    --header-border-light: #DDDDDD;
    --header-border-default: #B0B0B0;
    --header-border-dark: #717171;
    --header-font-primary: 'iransansxv', 'tahoma', sans-serif;
    --header-font-xs: 0.75rem;
    --header-font-sm: 0.875rem;
    --header-font-base: 1rem;
    --header-font-lg: 1.125rem;
    --header-font-xl: 1.25rem;
    --header-font-2xl: 1.5rem;
    --header-font-light: 300;
    --header-font-normal: 400;
    --header-font-medium: 500;
    --header-font-semibold: 600;
    --header-font-bold: 700;
    --header-font-extrabold: 800;
    --header-line-height-tight: 1.25;
    --header-line-height-normal: 1.5;
    --header-line-height-relaxed: 1.75;
    --header-line-height-loose: 2;
    --header-spacing-xs: 4px;
    --header-spacing-sm: 8px;
    --header-spacing-md: 12px;
    --header-spacing-lg: 16px;
    --header-spacing-xl: 24px;
    --header-spacing-2xl: 32px;
    --header-spacing-3xl: 48px;
    --header-spacing-4xl: 64px;
    --header-radius-sm: 4px;
    --header-radius-md: 8px;
    --header-radius-lg: 12px;
    --header-radius-xl: 16px;
    --header-radius-2xl: 24px;
    --header-radius-full: 9999px;
    --header-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --header-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --header-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --header-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --header-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --header-shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    --header-transition-fast: 150ms ease;
    --header-transition-base: 200ms ease;
    --header-transition-slow: 300ms ease;
    --header-transition-slower: 500ms ease;

    /* ═══════════════════════════════════════════════════════════════════
       15. COMPONENT SPECIFIC
       ═══════════════════════════════════════════════════════════════════ */

    /* Countdown Bar */
    --countdown-height: 64px;

    /* Doctor Profile */
    --sidebar-width: 360px;
    --doctor-image-size: 176px;

    /* ═══════════════════════════════════════════════════════════════════
       16. SOCIAL MEDIA COLORS
       ═══════════════════════════════════════════════════════════════════ */
    --whatsapp-green: #25D366;
    --whatsapp-hover: #20BA5A;
    --telegram-blue: #0088CC;
    --linkedin-blue: #0077B5;
    --twitter-blue: #1DA1F2;
    --twitter-hover: #1A8CD8;
    --instagram-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BASE HTML STYLES - مقدار پایه برای rem
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
html {
    font-size: 16px; /* 1rem = 16px - مقدار استاندارد برای تمام صفحات */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE OVERRIDES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Tablet */
@media (max-width: 1023px) {
    :root {
        --countdown-height: 60px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    :root {
        --countdown-height: 56px;
    }
}
