/* ----------------------------------------------------------------------------
   Cairo — the panel's Arabic face (self-hosted)
   ----------------------------------------------------------------------------
   Arabic codepoints ONLY. The unicode-range is what makes the pairing work:
   Latin keeps Plus Jakarta Sans, so a Latin brand name inside Arabic copy —
   "Hayat In" — still renders in the Latin face rather than being dragged into
   an Arabic one.

   One file for every weight: the wght axis is kept variable (200-1000) and the
   slant axis is pinned out, which is why 345 KB of TTF became 28 KB of woff2.
   See public/vendor_assets/fonts/README.txt for how it was subset, and
   Cairo-OFL.txt for the licence, which the OFL requires to ship alongside.

   font-display: swap — Arabic text renders immediately in the fallback and
   re-flows when Cairo lands, rather than the panel showing blank labels.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Cairo';
    /* Relative to THIS file at /vendor_assets/css/, not to the document. */
  /* format('woff2'), NOT the interim format('woff2-variations'): Firefox never
     recognised that value and would skip the source entirely, leaving Arabic on
     a system fallback. The `font-weight: 200 1000` range below is what declares
     this a variable font. */
  src: url('../fonts/cairo-arabic.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891,
                 U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011,
                 U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

/* ============================================================================
   Hayat In — Vendor Panel v2 · TOKEN LAYER
   ----------------------------------------------------------------------------
   Three tiers:
     1. Primitive ramps  --vp-{ramp}-{stop}   (never referenced by components)
     2. Semantic aliases --vp-bg, --vp-text…  (the ONLY tier dark mode overrides)
     3. Scales           space / radius / shadow / type / z / motion

   Every colour gets its first definition on bare :root. The dark blocks
   re-point semantic aliases only — never introduce a colour there.

   Brand hues are lifted verbatim from destination_types.color_code
   (database/migrations/2026_08_17_000001_create_destination_types_table.php)
   so panel badges match app badges byte-for-byte.
   ========================================================================== */

:root {
  /* ---- 1. PRIMITIVE RAMPS ------------------------------------------------ */

  /* primary — violet. 500 = #6C4CF1, the `destination` badge tint. */
  --vp-primary-50:  #F4F2FE;
  --vp-primary-100: #E9E4FD;
  --vp-primary-200: #D4C9FB;
  --vp-primary-300: #B7A5F8;
  --vp-primary-400: #9377F4;
  --vp-primary-500: #6C4CF1;
  --vp-primary-600: #5A3AD9;
  --vp-primary-700: #4A2EB4;
  --vp-primary-800: #3A248C;
  --vp-primary-900: #2A1A66;

  /* blue — secondary. Follow buttons, text links. */
  --vp-blue-50:  #E8F0FE;
  --vp-blue-100: #D2E3FC;
  --vp-blue-300: #7BA7F0;
  --vp-blue-500: #1A73E8;
  --vp-blue-600: #1558C4;
  --vp-blue-700: #10429B;

  /* neutral — surfaces and type */
  --vp-neutral-0:   #FFFFFF;
  --vp-neutral-25:  #FCFCFD;
  --vp-neutral-50:  #F9FAFB;
  --vp-neutral-100: #F3F4F6;
  --vp-neutral-200: #E5E7EB;
  --vp-neutral-300: #D1D5DB;
  --vp-neutral-400: #9CA3AF;
  --vp-neutral-500: #6B7280;
  --vp-neutral-600: #4B5563;
  --vp-neutral-700: #374151;
  --vp-neutral-800: #1F2937;
  --vp-neutral-900: #111827;
  --vp-neutral-950: #0B0F17;

  /* success — 500 = #22C55E (park) */
  --vp-success-50:  #ECFDF5;
  --vp-success-100: #D1FAE5;
  --vp-success-500: #22C55E;
  --vp-success-600: #16A34A;
  --vp-success-700: #15803D;

  /* warning — 500 = #F59E0B (mall) */
  --vp-warning-50:  #FFFBEB;
  --vp-warning-100: #FEF3C7;
  --vp-warning-500: #F59E0B;
  --vp-warning-600: #D97706;
  --vp-warning-700: #B45309;

  /* danger — 500 = #EF4444 (attraction) */
  --vp-danger-50:  #FEF2F2;
  --vp-danger-100: #FEE2E2;
  --vp-danger-500: #EF4444;
  --vp-danger-600: #DC2626;
  --vp-danger-700: #B91C1C;

  /* info — 500 = #0EA5E9 (island) */
  --vp-info-50:  #F0F9FF;
  --vp-info-100: #E0F2FE;
  --vp-info-500: #0EA5E9;
  --vp-info-600: #0284C7;
  --vp-info-700: #0369A1;

  /* accents — badge / chart tints, straight from the migration */
  --vp-accent-violet: #8B5CF6;  /* district    */
  --vp-accent-cyan:   #06B6D4;  /* waterfront  */
  --vp-accent-teal:   #14B8A6;  /* beach       */
  --vp-accent-pink:   #EC4899;  /* hotel       */
  --vp-accent-amber:  #F59E0B;  /* mall        */

  /* ---- 2. SEMANTIC ALIASES (light) --------------------------------------- */

  --vp-bg:             var(--vp-neutral-50);
  --vp-surface:        var(--vp-neutral-0);
  --vp-surface-2:      var(--vp-neutral-50);
  --vp-surface-sunken: var(--vp-neutral-100);
  --vp-surface-hover:  var(--vp-neutral-50);

  --vp-text:         var(--vp-neutral-900);
  --vp-text-muted:   var(--vp-neutral-500);
  --vp-text-subtle:  var(--vp-neutral-400);
  --vp-text-inverse: var(--vp-neutral-0);

  --vp-border:        var(--vp-neutral-200);
  --vp-border-strong: var(--vp-neutral-300);
  --vp-divider:       var(--vp-neutral-100);

  --vp-primary:             var(--vp-primary-500);
  --vp-primary-hover:       var(--vp-primary-600);
  --vp-primary-active:      var(--vp-primary-700);
  --vp-primary-soft:        var(--vp-primary-50);
  --vp-primary-soft-border: var(--vp-primary-200);
  /* A second, stronger tint. The 50/100 pair reads as rest/hover in light mode;
     in dark both must become translucent, or the "hover" step is a WHITE flash. */
  --vp-primary-soft-strong: var(--vp-primary-100);
  /* Primary as TEXT on a soft fill — same problem --vp-warning-text solves below.
     700 is 8.11:1 on the light tint; on the dark translucent tint it is 1.3:1. */
  --vp-primary-text:        var(--vp-primary-700);
  --vp-primary-contrast:    #FFFFFF;

  --vp-link:       var(--vp-blue-500);
  --vp-link-hover: var(--vp-blue-600);

  --vp-success:          var(--vp-success-600);
  --vp-success-soft:        var(--vp-success-50);
  --vp-success-soft-border: var(--vp-success-100);
  --vp-success-text:        var(--vp-success-700);
  --vp-success-contrast: #FFFFFF;
  --vp-warning:          var(--vp-warning-600);
  --vp-warning-soft:        var(--vp-warning-50);
  --vp-warning-soft-border: var(--vp-warning-100);
  --vp-warning-contrast: #FFFFFF;
  /* Warning as TEXT, which needs more contrast than warning-as-fill. Measured on
     the surfaces they actually sit on: 600 is 3.19:1 on white — fine for a border
     or an icon, short of 4.5:1 for a sentence. 700 is 5.02:1 here and 3.54:1 on
     the dark surface, so it cannot be one value; the dark blocks below flip it. */
  --vp-warning-text:     var(--vp-warning-700);
  --vp-danger:           var(--vp-danger-600);
  --vp-danger-soft:        var(--vp-danger-50);
  --vp-danger-soft-border: var(--vp-danger-100);
  --vp-danger-text:        var(--vp-danger-700);
  --vp-danger-contrast:  #FFFFFF;
  --vp-info:             var(--vp-info-600);
  --vp-info-soft:        var(--vp-info-50);
  --vp-info-soft-border: var(--vp-info-100);
  --vp-info-text:        var(--vp-info-700);
  --vp-info-contrast:    #FFFFFF;

  --vp-focus-ring: var(--vp-primary-500);
  --vp-overlay:    rgba(17, 24, 39, .45);

  --vp-gradient-primary: linear-gradient(135deg, #4A2EB4 0%, #6C4CF1 55%, #8B5CF6 100%);


  /* ---- 3. SCALES --------------------------------------------------------- */

  /* space — 4px base */
  --vp-space-0:  0;
  --vp-space-1:  2px;
  --vp-space-2:  4px;
  --vp-space-3:  6px;
  --vp-space-4:  8px;
  --vp-space-5:  12px;
  --vp-space-6:  16px;
  --vp-space-7:  20px;
  --vp-space-8:  24px;
  --vp-space-10: 32px;
  --vp-space-12: 40px;
  --vp-space-14: 48px;
  --vp-space-16: 64px;

  /* radius */
  --vp-radius-xs:   6px;
  --vp-radius-sm:   8px;
  --vp-radius-md:   12px;
  --vp-radius-lg:   16px;
  --vp-radius-xl:   20px;
  --vp-radius-2xl:  24px;
  --vp-radius-pill: 999px;

  /* shadow — all soft / low-alpha, never heavy */
  --vp-shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --vp-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px -2px rgba(16, 24, 40, .06);
  --vp-shadow-md: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 20px -12px rgba(16, 24, 40, .18);
  --vp-shadow-lg: 0 1px 3px rgba(16, 24, 40, .05), 0 16px 34px -18px rgba(16, 24, 40, .22);
  --vp-shadow-xl: 0 2px 4px rgba(16, 24, 40, .05), 0 28px 56px -24px rgba(16, 24, 40, .26);
  --vp-shadow-primary: 0 8px 20px -10px rgba(108, 76, 241, .70);

  /* type */
  /* Cairo sits after the Latin face and before Noto: the browser walks the
     stack per CHARACTER, so Latin resolves to Plus Jakarta Sans and Arabic
     falls through to Cairo. Noto Sans Arabic stays as the safety net for any
     Arabic codepoint outside Cairo's subset — its files are only fetched if
     something actually needs them, because Google serves it unicode-ranged. */
  --vp-font-sans: 'Plus Jakarta Sans', 'Cairo', 'Noto Sans Arabic', ui-sans-serif, system-ui,
                  -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --vp-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --vp-text-xs:   .75rem;    /* 12 */
  --vp-text-sm:   .8125rem;  /* 13 */
  --vp-text-base: .875rem;   /* 14 */
  --vp-text-md:   .9375rem;  /* 15 */
  --vp-text-lg:   1.0625rem; /* 17 */
  --vp-text-xl:   1.25rem;   /* 20 */
  --vp-text-2xl:  1.4375rem; /* 23 — section header */
  --vp-text-3xl:  1.75rem;   /* 28 */
  --vp-text-4xl:  2.25rem;   /* 36 */

  --vp-weight-400: 400;
  --vp-weight-500: 500;
  --vp-weight-600: 600;
  --vp-weight-700: 700;
  --vp-weight-800: 800;

  --vp-leading-tight:   1.2;
  --vp-leading-snug:    1.35;
  --vp-leading-normal:  1.5;
  --vp-leading-relaxed: 1.65;

  --vp-tracking-tight: -.02em;

  /* z-index */
  --vp-z-base:     0;
  --vp-z-dropdown: 100;
  --vp-z-sticky:   200;
  --vp-z-sidebar:  300;
  --vp-z-overlay:  400;
  --vp-z-modal:    500;
  --vp-z-toast:    600;

  /* motion
     Durations are deliberately short. Panel motion is feedback, not decoration:
     it should confirm that something happened, never make the operator wait.
     --vp-ease-spring overshoots slightly and is reserved for elements that
     ENTER (toasts, modals, popovers); reversals and exits use --vp-ease so
     nothing bounces on its way out. */
  --vp-dur-fast:   120ms;
  --vp-dur-base:   180ms;
  --vp-dur-slow:   280ms;
  --vp-dur-slower: 420ms;
  --vp-ease:        cubic-bezier(.4, 0, .2, 1);
  --vp-ease-out:    cubic-bezier(.16, 1, .3, 1);
  --vp-ease-in:     cubic-bezier(.4, 0, 1, 1);
  --vp-ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* interaction feedback */
  --vp-lift:        translateY(-2px);
  --vp-press:       scale(.97);
  --vp-focus-ring:  0 0 0 3px var(--vp-primary-100);
  --vp-stagger:     40ms;   /* per-item delay in staggered list entrances */

  /* shell metrics */
  /* 204px is the reference design's rail width (shared/css/layout.css).
     The content column that follows from it is what makes the panel line
     up with the approved screens. */
  --vp-sidebar-w:           204px;
  --vp-sidebar-w-collapsed: 76px;
  /* The ported design topbar. Three sticky elements offset themselves
     by this, and at the old 64px they slid underneath it. */
  --vp-topbar-h:            92px;
}

/* ---- DARK: system preference ---------------------------------------------
   Guarded so an explicit [data-vp-theme="light"] beats the OS setting.       */
@media (prefers-color-scheme: dark) {
  :root:not([data-vp-theme="light"]) {
    --vp-bg:             var(--vp-neutral-950);
    --vp-surface:        #131822;
    --vp-surface-2:      #1A2029;
    --vp-surface-sunken: #0F141C;
    --vp-surface-hover:  #1E2530;

    --vp-text:         var(--vp-neutral-100);
    --vp-text-muted:   var(--vp-neutral-400);
    --vp-text-subtle:  var(--vp-neutral-500);
    --vp-text-inverse: var(--vp-neutral-900);

    --vp-border:        #262E3B;
    --vp-border-strong: #364052;
    --vp-divider:       #1E2530;

    --vp-primary:             var(--vp-primary-400);
    --vp-primary-hover:       var(--vp-primary-300);
    --vp-primary-active:      var(--vp-primary-200);
    --vp-primary-soft:        rgba(108, 76, 241, .16);
    --vp-primary-soft-border: rgba(147, 119, 244, .34);
    --vp-primary-soft-strong: rgba(108, 76, 241, .30);
    --vp-primary-text:        var(--vp-primary-200);
    --vp-primary-contrast:    #0B0F17;

    --vp-link:       var(--vp-blue-300);
    --vp-link-hover: #9CC0F5;

    /* A tone as TEXT on that tone's own soft fill. The 500 shades are fill
       colours: #EF4444 on the 16% danger tint over #131822 measures 4.04:1,
       which is under AA. The 100 shades are the pair that works on a dark
       tint, and they are what these tokens are for. The light blocks above
       keep the 700 shades for the same reason in reverse. */
    --vp-success:      var(--vp-success-500);
    --vp-success-soft: rgba(34, 197, 94, .16);
    --vp-success-soft-border: rgba(34, 197, 94, .34);
    --vp-success-text: var(--vp-success-100);
    --vp-warning:      var(--vp-warning-500);
    --vp-warning-soft: rgba(245, 158, 11, .16);
    --vp-warning-soft-border: rgba(245, 158, 11, .34);
    --vp-warning-text: var(--vp-warning-100);
    --vp-danger:       var(--vp-danger-500);
    --vp-danger-soft:  rgba(239, 68, 68, .16);
    --vp-danger-soft-border: rgba(239, 68, 68, .34);
    --vp-danger-text:  var(--vp-danger-100);
    --vp-info:         var(--vp-info-500);
    --vp-info-soft:    rgba(14, 165, 233, .16);
    --vp-info-soft-border: rgba(14, 165, 233, .34);
    --vp-info-text:    var(--vp-info-100);

    --vp-focus-ring: var(--vp-primary-400);
    --vp-overlay:    rgba(0, 0, 0, .62);


    --vp-shadow-xs: 0 1px 2px rgba(0, 0, 0, .40);
    --vp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .40), 0 2px 6px -2px rgba(0, 0, 0, .45);
    --vp-shadow-md: 0 1px 2px rgba(0, 0, 0, .40), 0 8px 20px -12px rgba(0, 0, 0, .60);
    --vp-shadow-lg: 0 1px 3px rgba(0, 0, 0, .45), 0 16px 34px -18px rgba(0, 0, 0, .66);
    --vp-shadow-xl: 0 2px 4px rgba(0, 0, 0, .45), 0 28px 56px -24px rgba(0, 0, 0, .70);
    --vp-shadow-primary: 0 8px 20px -10px rgba(108, 76, 241, .55);
  }
}

/* ---- DARK: explicit attribute — wins over the media query ---------------- */
:root[data-vp-theme="dark"] {
  --vp-bg:             var(--vp-neutral-950);
  --vp-surface:        #131822;
  --vp-surface-2:      #1A2029;
  --vp-surface-sunken: #0F141C;
  --vp-surface-hover:  #1E2530;

  --vp-text:         var(--vp-neutral-100);
  --vp-text-muted:   var(--vp-neutral-400);
  --vp-text-subtle:  var(--vp-neutral-500);
  --vp-text-inverse: var(--vp-neutral-900);

  --vp-border:        #262E3B;
  --vp-border-strong: #364052;
  --vp-divider:       #1E2530;

  --vp-primary:             var(--vp-primary-400);
  --vp-primary-hover:       var(--vp-primary-300);
  --vp-primary-active:      var(--vp-primary-200);
  --vp-primary-soft:        rgba(108, 76, 241, .16);
  --vp-primary-soft-border: rgba(147, 119, 244, .34);
  --vp-primary-soft-strong: rgba(108, 76, 241, .30);
  --vp-primary-text:        var(--vp-primary-200);
  --vp-primary-contrast:    #0B0F17;

  --vp-link:       var(--vp-blue-300);
  --vp-link-hover: #9CC0F5;

  /* A tone as TEXT on that tone's own soft fill. The 500 shades are fill
     colours: #EF4444 on the 16% danger tint over #131822 measures 4.04:1,
     which is under AA. The 100 shades are the pair that works on a dark
     tint, and they are what these tokens are for. The light blocks above
     keep the 700 shades for the same reason in reverse. */
  --vp-success:      var(--vp-success-500);
  --vp-success-soft: rgba(34, 197, 94, .16);
  --vp-success-soft-border: rgba(34, 197, 94, .34);
  --vp-success-text: var(--vp-success-100);
  --vp-warning:      var(--vp-warning-500);
  --vp-warning-soft: rgba(245, 158, 11, .16);
  --vp-warning-soft-border: rgba(245, 158, 11, .34);
  --vp-warning-text: var(--vp-warning-100);
  --vp-danger:       var(--vp-danger-500);
  --vp-danger-soft:  rgba(239, 68, 68, .16);
  --vp-danger-soft-border: rgba(239, 68, 68, .34);
  --vp-danger-text:  var(--vp-danger-100);
  --vp-info:         var(--vp-info-500);
  --vp-info-soft:    rgba(14, 165, 233, .16);
  --vp-info-soft-border: rgba(14, 165, 233, .34);
  --vp-info-text:    var(--vp-info-100);

  --vp-focus-ring: var(--vp-primary-400);
  --vp-overlay:    rgba(0, 0, 0, .62);


  --vp-shadow-xs: 0 1px 2px rgba(0, 0, 0, .40);
  --vp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .40), 0 2px 6px -2px rgba(0, 0, 0, .45);
  --vp-shadow-md: 0 1px 2px rgba(0, 0, 0, .40), 0 8px 20px -12px rgba(0, 0, 0, .60);
  --vp-shadow-lg: 0 1px 3px rgba(0, 0, 0, .45), 0 16px 34px -18px rgba(0, 0, 0, .66);
  --vp-shadow-xl: 0 2px 4px rgba(0, 0, 0, .45), 0 28px 56px -24px rgba(0, 0, 0, .70);
  --vp-shadow-primary: 0 8px 20px -10px rgba(108, 76, 241, .55);
}

/* Vestibular safety: collapse every duration AND neutralise the transforms, so
   nothing translates, scales or bounces for someone who asked it not to. The
   blanket rule at the end of components.css also kills keyframe animations. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --vp-dur-fast:   0ms;
    --vp-dur-base:   0ms;
    --vp-dur-slow:   0ms;
    --vp-dur-slower: 0ms;
    --vp-lift:       none;
    --vp-press:      none;
    --vp-stagger:    0ms;
  }
}
