/**
 * CSS Variables - Usit Holidays Design System
 * Based on phase2.md specifications
 */

:root {
  /* ===== Primary Colors ===== */
  --primary-purple: #7355AE;
  --primary-pink: #CC2B5E;
  --gradient-primary: linear-gradient(135deg, #7355AE 0%, #CC2B5E 100%);

  /* ===== Neutral Colors ===== */
  --white: #FFFFFF;
  --text-dark: #1F2937;
  --text-gray: #6B7280;
  --border-light: #E5E7EB;
  --bg-light: #F9FAFB;

  /* ===== Status Colors ===== */
  --success-green: #10B981;
  --warning-orange: #F59E0B;
  --error-red: #EF4444;
  --info-blue: #3B82F6;

  /* ===== Typography ===== */
  --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

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

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

  /* ===== Spacing (8px grid system) ===== */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */

  /* ===== Border Radius ===== */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;  /* Pills/badges */

  /* ===== Shadows ===== */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-search-bar: 0 10px 40px rgba(0, 0, 0, 0.1);

  /* ===== Z-index Scale ===== */
  --z-dropdown: 1000;
  --z-sticky: 1010;
  --z-modal-backdrop: 1020;
  --z-modal: 1030;
  --z-toast: 1040;

  /* ===== Transitions ===== */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;

  /* ===== Breakpoints (for use in JS) ===== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1440px;
}

/* ===== Global Resets & Base Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* ===== Typography Base ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
}

/* ===== Links ===== */
a {
  color: var(--primary-purple);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-pink);
}

/* ===== Buttons Base ===== */
button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Inputs Base ===== */
input,
select,
textarea {
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-dark);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* ===== Utility Classes ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Focus Visible (Accessibility) ===== */
*:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--text-gray);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-purple);
}

/* ===== Selection ===== */
::selection {
  background-color: var(--primary-purple);
  color: var(--white);
}

::-moz-selection {
  background-color: var(--primary-purple);
  color: var(--white);
}
