/* ========================================
   Tempo Design System - Glassmorphism
   iOS 26 Style Effects
======================================== */

/* ========================================
   BASE GLASS
======================================== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ========================================
   GLASS VARIANTS
======================================== */

.glass-light {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   SURFACE ELEVATIONS
======================================== */

.surface-elevated-1 {
  background-color: var(--surf-container);
  border: 1px solid var(--outline-variant);
}

.surface-elevated-2 {
  background-color: var(--surf-container-high);
  border: 1px solid var(--outline-variant);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.surface-elevated-3 {
  background-color: var(--surf-container-highest);
  border: 1px solid var(--outline);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.surface-floating {
  background-color: var(--surf-container-high);
  border: 1px solid var(--outline-variant);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ========================================
   INTERACTIVE STATES
======================================== */

.glass-hover {
  transition: all 0.2s ease;
}

.glass-hover:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.glass-active:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.98);
}

/* ========================================
   ROUNDED CORNERS (macOS style)
======================================== */

:root {
  --rounded-none: 0;
  --rounded-sm: 4px;
  --rounded: 6px;
  --rounded-md: 8px;
  --rounded-lg: 10px;
  --rounded-xl: 12px;
  --rounded-2xl: 16px;
  --rounded-full: 9999px;
  --rounded-macos-sm: 5px;
  --rounded-macos: 7px;
  --rounded-macos-lg: 10px;
}

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 4px; }
.rounded { border-radius: 6px; }
.rounded-md { border-radius: 8px; }
.rounded-lg { border-radius: 10px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

/* macOS specific */
.rounded-macos-sm { border-radius: 5px; }
.rounded-macos { border-radius: 7px; }
.rounded-macos-lg { border-radius: 10px; }

/* ========================================
   OPACITY LEVELS
======================================== */

.opacity-0 { opacity: 0; }
.opacity-5 { opacity: 0.05; }
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-30 { opacity: 0.3; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* ========================================
   BACKDROP UTILITIES
======================================== */

.backdrop-blur-none { backdrop-filter: blur(0); }
.backdrop-blur-xs { backdrop-filter: blur(2px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur { backdrop-filter: blur(8px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.backdrop-blur-lg { backdrop-filter: blur(16px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }
.backdrop-blur-2xl { backdrop-filter: blur(40px); }

/* ========================================
   BORDER UTILITIES
======================================== */

.border-glass {
  border: 1px solid var(--glass-border);
}

.border-thin {
  border-width: 1px;
  border-style: solid;
  border-color: var(--outline-variant);
}

.border-medium {
  border-width: 1.5px;
  border-style: solid;
  border-color: var(--outline);
}

/* ========================================
   SHADOWS
======================================== */

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Colored shadows */
.shadow-brand {
  box-shadow: 0 4px 14px 0 rgba(205, 157, 250, 0.3);
}

.shadow-error {
  box-shadow: 0 4px 14px 0 rgba(229, 25, 25, 0.3);
}

.shadow-success {
  box-shadow: 0 4px 14px 0 rgba(31, 223, 102, 0.3);
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Animation utilities */
.animate-fadeIn { animation: fadeIn 0.2s ease-out; }
.animate-fadeOut { animation: fadeOut 0.2s ease-out; }
.animate-slideUp { animation: slideUp 0.3s ease-out; }
.animate-slideDown { animation: slideDown 0.3s ease-out; }
.animate-scaleIn { animation: scaleIn 0.2s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

.animate-duration-fast { animation-duration: 0.15s; }
.animate-duration-normal { animation-duration: 0.3s; }
.animate-duration-slow { animation-duration: 0.5s; }

.animate-ease-linear { animation-timing-function: linear; }
.animate-ease-out { animation-timing-function: ease-out; }
.animate-ease-in-out { animation-timing-function: ease-in-out; }

/* Transitions */
.transition-fast { transition: all 0.15s ease; }
.transition-normal { transition: all 0.3s ease; }
.transition-slow { transition: all 0.5s ease; }

/* ========================================
   TEXT SELECTION
======================================== */

::selection {
  background-color: var(--brand-primary);
  color: var(--on-brand);
  border-radius: 4px;
}

textarea::selection,
input::selection {
  background-color: var(--brand-primary);
  color: var(--on-brand);
  border-radius: 4px;
}
