/* UCN Telehealth - Base Design System */
/* Clean, sterile medical aesthetic - White & Blue with Marble */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* Primary Blues */
  --blue-50: #f0f7ff;
  --blue-100: #e0efff;
  --blue-200: #b8daff;
  --blue-300: #7ec0ff;
  --blue-400: #3a9fff;
  --blue-500: #0077e6;
  --blue-600: #005bb5;
  --blue-700: #004494;
  --blue-800: #003473;
  --blue-900: #002452;

  /* Whites & Grays */
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Semantic Colors */
  --primary: var(--blue-500);
  --primary-hover: var(--blue-600);
  --primary-light: var(--blue-100);
  --secondary: var(--gray-600);
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: var(--blue-400);

  /* Background Colors */
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--blue-50);

  /* Text Colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --text-inverse: var(--white);

  /* Borders */
  --border-color: var(--gray-300);
  --border-light: var(--gray-200);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Shadows - subtle, clinical */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-modal: 200;
  --z-toast: 300;
  --z-tooltip: 400;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  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);
  font-weight: var(--font-normal);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* Marble Background Pattern */
.marble-bg {
  background:
    /* Marble veining effect */
    linear-gradient(125deg,
      transparent 0%,
      rgba(0, 119, 230, 0.03) 25%,
      transparent 50%,
      rgba(0, 119, 230, 0.02) 75%,
      transparent 100%
    ),
    linear-gradient(225deg,
      transparent 0%,
      rgba(206, 212, 218, 0.15) 20%,
      transparent 40%,
      rgba(206, 212, 218, 0.1) 60%,
      transparent 80%
    ),
    linear-gradient(45deg,
      transparent 0%,
      rgba(255, 255, 255, 0.8) 30%,
      transparent 60%
    ),
    linear-gradient(315deg,
      rgba(241, 243, 245, 1) 0%,
      rgba(248, 249, 250, 1) 50%,
      rgba(241, 243, 245, 1) 100%
    );
  background-size: 400% 400%, 300% 300%, 200% 200%, 100% 100%;
  animation: marble-shift 30s ease infinite;
}

@keyframes marble-shift {
  0%, 100% { background-position: 0% 50%, 100% 50%, 50% 0%, 0% 0%; }
  50% { background-position: 100% 50%, 0% 50%, 50% 100%, 0% 0%; }
}

/* Static marble for elements that shouldn't animate */
.marble-static {
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(241, 243, 245, 0.95) 25%,
      rgba(248, 249, 250, 1) 50%,
      rgba(241, 243, 245, 0.95) 75%,
      rgba(255, 255, 255, 0.9) 100%
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(206, 212, 218, 0.05) 10px,
      rgba(206, 212, 218, 0.05) 20px
    );
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: 1.3;
  color: var(--text-primary);
}

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);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

strong, b {
  font-weight: var(--font-semibold);
}

small {
  font-size: var(--text-sm);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 768px; }
.container-lg { max-width: 1024px; }
.container-xl { max-width: 1280px; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Spacing */
.m-0 { margin: 0; }
.m-4 { margin: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.my-8 { margin-top: var(--space-8); margin-bottom: var(--space-8); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-blue { color: var(--primary); }
.text-white { color: var(--white); }

/* Background colors */
.bg-white { background-color: var(--white); }
.bg-blue { background-color: var(--primary); }
.bg-blue-light { background-color: var(--primary-light); }

/* Width/Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ========================================
   SELECTION & FOCUS
   ======================================== */
::selection {
  background-color: var(--blue-200);
  color: var(--blue-900);
}

:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   SCROLLBAR (webkit)
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 var(--space-3);
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .hide-mobile {
    display: none;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none;
  }
}
