/*
 * User Visual Design Core — Phase 3B.12
 * Infrastructure-only CSS. It defines stable design tokens and helper classes
 * without redesigning existing pages. Phase 3B.8 preserves visual parity while
 * registering dashboard/downloads components for future skins.
 */

:root,
html[data-uvd-skin="classic-base"] {
  --uvd-font-base: Vazirmatn, Tahoma, sans-serif;
  --uvd-font-display: 'B-Titr', Vazirmatn, Tahoma, sans-serif;
  --uvd-font-reading: 'B-Nazanin', Vazirmatn, Tahoma, sans-serif;

  --uvd-bg: #94BDFF;
  --uvd-bg-soft: #f0f4ff;
  --uvd-surface: #ffffff;
  --uvd-surface-strong: #ffffff;
  --uvd-surface-soft: #f0f4ff;
  --uvd-text: #222222;
  --uvd-text-strong: #111827;
  --uvd-muted: #64748b;
  --uvd-inverse-text: #ffffff;
  --uvd-primary: #3975C4;
  --uvd-primary-strong: #2851a3;
  --uvd-accent: #FFD700;
  --uvd-danger: #d8000c;
  --uvd-success: #16a34a;
  --uvd-warning: #f59e0b;
  --uvd-border: rgba(57, 117, 196, .16);
  --uvd-border-strong: rgba(57, 117, 196, .26);
  --uvd-shadow-soft: 0 5px 15px rgba(0, 0, 0, .15);
  --uvd-shadow-card: 0 10px 25px rgba(0, 0, 0, .15);
  --uvd-shadow-floating: 0 18px 44px rgba(15, 23, 42, .16);
  --uvd-radius-sm: 8px;
  --uvd-radius-md: 12px;
  --uvd-radius-lg: 15px;
  --uvd-radius-xl: 22px;
  --uvd-blur: 0px;
  --uvd-depth: 1;
  --uvd-motion-fast: 160ms;
  --uvd-motion-normal: 260ms;
  --uvd-motion-slow: 420ms;

  --uvd-header-bg: linear-gradient(135deg, #3975C4, #6CA0DC);
  --uvd-header-title: #FFD700;
  --uvd-header-text: #ffffff;
  --uvd-menu-bg: #ffffff;
  --uvd-menu-link: #3975C4;
  --uvd-menu-link-hover-bg: #f0f4ff;
  --uvd-menu-user-bg: #f0f4ff;
}

html[data-uvd-effect="calm"] {
  --uvd-depth: .65;
  --uvd-blur: 0px;
  --uvd-motion-normal: 180ms;
}

html[data-uvd-effect="wow"] {
  --uvd-depth: 1.25;
  --uvd-shadow-floating: 0 24px 64px rgba(15, 23, 42, .22);
}

html[data-uvd-motion="reduced"] *,
html[data-uvd-page-mode="performance-safe"] * {
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-uvd-core] *,
  html[data-uvd-core] *::before,
  html[data-uvd-core] *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.uvd-core-ready {
  --uvd-page-core-state: ready;
}

.uvd-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.uvd-shell-token-probe {
  color: var(--uvd-text);
  background: var(--uvd-surface);
  border-color: var(--uvd-border);
}


/* Phase 3B.12 parity metadata. These variables do not override legacy page CSS. */
html[data-uvd-core="phase-3b-12"] {
  --uvd-integration-strategy: phased-skin-prototype;
  --uvd-dashboard-integration: dashboard-downloads-dark-luxury-3d;
}


html[data-uvd-skin="dark-luxury-3d"] {
  --uvd-active-skin-phase: phase-3b-12-featured-downloads-hero-cta;
  --uvd-active-skin-layout-policy: preserve-current-functional-layout;
  --uvd-active-skin-surface-model: deep-glass-metal-3d;
}

/* Phase 3D.1 metadata — shared user-page shell/component contracts are registered. */
html[data-uvd-core="phase-3d-1"] {
  --uvd-integration-strategy: inventory-driven-user-page-theme-expansion;
  --uvd-user-shell-contract-phase: phase-3d-1;
}

/* Phase 3D.2.4 metadata — simple-page mobile containment and Dark Luxury parity polish. */
html[data-uvd-core="phase-3d-2-4"] {
  --uvd-integration-strategy: inventory-driven-user-page-theme-expansion;
  --uvd-user-shell-contract-phase: phase-3d-2-4;
  --uvd-simple-pages-mobile-containment-phase: phase-3d-2-4;
}


/* Phase 3D.3.1 metadata — dashboard mobile theme-switcher relocation hotfix. */
html[data-uvd-core="phase-3d-3-1"] {
  --uvd-integration-strategy: inventory-driven-user-page-theme-expansion;
  --uvd-dashboard-profile-phase: phase-3d-3-1;
  --uvd-dashboard-mobile-theme-switcher-phase: phase-3d-3-1;
}

/* Phase 3D.4 metadata — shared chat module theme gate. */
html[data-uvd-core="phase-3d-4"] {
  --uvd-integration-strategy: inventory-driven-user-page-theme-expansion;
  --uvd-user-shell-contract-phase: phase-3d-3-1;
  --uvd-chat-module-theme-phase: phase-3d-4;
}

/* Phase 3D.4.1 metadata — chat gateway reconnect and Dark Luxury state/tone fixes. */
html[data-uvd-core="phase-3d-4-1"] {
  --uvd-integration-strategy: inventory-driven-user-page-theme-expansion;
  --uvd-user-shell-contract-phase: phase-3d-3-1;
  --uvd-chat-module-theme-phase: phase-3d-4-1;
  --uvd-chat-gateway-reliability-phase: phase-3d-4-1;
}

/* Phase 3D.16/3D.16.1 metadata — public/static shell completed for maintenance/about; 3D.16.1 fixes standalone font loading and about central header skin. */
html[data-uvd-core="phase-3d-16"],
html[data-uvd-core="phase-3d-16-1"] {
  --uvd-integration-strategy: css-only-theme-contract-completion;
  --uvd-public-static-shell-contract-phase: phase-3d-16;
  --uvd-theme-extension-readiness: pending-final-contract-sweep;
}
