/**
 * KCA Reservation System - Minimal Light Theme Utilities
 * Theme: Refined Elegance
 *
 * A clean, minimal styling system replacing glassmorphism
 * with subtle shadows, borders, and elegant transitions.
 */

/* ═══════════════════════════════════════════════════════════
   PAGE BACKGROUNDS
   ═══════════════════════════════════════════════════════════ */

/* Main Page Background - Light & Clean */
.aurora-bg {
  position: relative;
  background: var(--bg-secondary);
  min-height: 100vh;
}

/* Optional subtle gradient background */
.aurora-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-bg-warm);
  pointer-events: none;
}

/* Dark variant (for admin) */
.aurora-bg-dark {
  position: relative;
  background: var(--color-secondary-900);
  min-height: 100vh;
}

/* Light variant */
.aurora-bg-light {
  position: relative;
  background: var(--bg-primary);
  min-height: 100vh;
}

/* Orbs container - Hidden in light mode */
.orbs-container {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   CARD COMPONENTS
   ═══════════════════════════════════════════════════════════ */

/* Base Card */
.glass,
.glass-card,
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
}

/* Interactive Card */
.glass-card {
  padding: var(--space-6);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-dark);
}

/* Dense Card */
.glass-dense {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
}

/* Light/Subtle Card */
.glass-light,
.glass-subtle,
.glass-ghost {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

/* Dark Card (for admin pages) */
.glass-dark,
.glass-dark-dense {
  background: var(--color-secondary-800);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

/* Panel with Gradient Header */
.glass-panel-gradient {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.glass-panel-gradient > .panel-header {
  background: var(--gradient-secondary);
  padding: var(--space-5) var(--space-6);
  color: var(--text-inverse);
}

/* ═══════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════ */

.glass-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-primary);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.glass-input:focus {
  outline: none;
  border-color: var(--color-primary-400);
  box-shadow: var(--input-shadow-focus);
}

.glass-input:disabled {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.glass-input.error {
  border-color: var(--color-danger-500);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.glass-input.success {
  border-color: var(--color-success-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Dark Input (for admin) */
.glass-input-dark {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-inverse);
}

.glass-input-dark::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.glass-input-dark:focus {
  border-color: var(--color-primary-400);
}

/* ═══════════════════════════════════════════════════════════
   SELECT
   ═══════════════════════════════════════════════════════════ */

.glass-select {
  appearance: none;
  width: 100%;
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4);
  background: var(--bg-primary);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.glass-select:focus {
  outline: none;
  border-color: var(--color-primary-400);
  box-shadow: var(--input-shadow-focus);
}

/* ═══════════════════════════════════════════════════════════
   TEXTAREA
   ═══════════════════════════════════════════════════════════ */

.glass-textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  resize: vertical;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.glass-textarea:focus {
  outline: none;
  border-color: var(--color-primary-400);
  box-shadow: var(--input-shadow-focus);
}

/* ═══════════════════════════════════════════════════════════
   FLOATING LABEL
   ═══════════════════════════════════════════════════════════ */

.float-group {
  position: relative;
  margin-bottom: var(--space-6);
}

.float-input {
  width: 100%;
  padding: var(--space-5) var(--space-4) var(--space-2);
  background: var(--bg-primary);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.float-input::placeholder {
  color: transparent;
}

.float-label {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-sm);
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--duration-fast) var(--ease-out);
  background: var(--bg-primary);
  padding: 0 var(--space-1);
}

.float-input:focus ~ .float-label,
.float-input:not(:placeholder-shown) ~ .float-label {
  top: 0;
  font-size: var(--text-xs);
  color: var(--color-primary-600);
  font-weight: var(--font-medium);
}

.float-input:focus {
  outline: none;
  border-color: var(--color-primary-400);
  box-shadow: var(--input-shadow-focus);
}

/* Validation Error 스타일 */
.float-input.is-invalid {
  border-color: var(--color-danger-500);
}

.float-input.is-invalid:focus {
  border-color: var(--color-danger-500);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.float-group .invalid-feedback {
  position: absolute;
  bottom: -20px;
  left: 0;
  color: var(--color-danger-500);
  font-size: var(--text-xs);
}

/* ═══════════════════════════════════════════════════════════
   CHECKBOX
   ═══════════════════════════════════════════════════════════ */

.glass-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.glass-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.glass-checkbox-box {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: var(--bg-primary);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
}

.glass-checkbox:hover .glass-checkbox-box {
  border-color: var(--color-primary-400);
}

.glass-checkbox-input:checked + .glass-checkbox-box {
  background: var(--color-primary-500);
  border-color: var(--color-primary-500);
}

.glass-checkbox-input:checked + .glass-checkbox-box .checkmark {
  opacity: 1;
  transform: scale(1);
}

.glass-checkbox-box .checkmark {
  width: 12px;
  height: 12px;
  stroke: var(--text-inverse);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--duration-fast) var(--ease-spring);
}

.glass-checkbox-input:focus + .glass-checkbox-box {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.glass-checkbox-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════════════════════ */

.glass-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
}

.glass-table thead {
  background: var(--bg-tertiary);
}

.glass-table th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-bottom: 1px solid var(--border-default);
}

.glass-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.glass-table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}

.glass-table tbody tr:hover {
  background: var(--bg-secondary);
}

.glass-table tbody tr:last-child td {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */

.glass-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal) var(--ease-out);
}

.glass-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.glass-modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.glass-modal-backdrop.active .glass-modal {
  transform: scale(1) translateY(0);
}

.glass-modal-header {
  background: var(--gradient-secondary);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-inverse);
}

.glass-modal-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.glass-modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.glass-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.glass-modal-body {
  padding: var(--space-6);
  max-height: calc(90vh - 160px);
  overflow-y: auto;
}

.glass-modal-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */

.nav-glass,
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  color: var(--text-inverse);
}

.nav-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-lg);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--color-primary-600);
  background: var(--color-primary-50);
}

.nav-link.active {
  color: var(--text-inverse);
  background: var(--color-primary-500);
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */

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

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-primary { box-shadow: var(--shadow-primary); }

/* Legacy blur utilities - disabled for performance */
.blur-xs,
.blur-sm,
.blur-md,
.blur-lg,
.blur-xl {
  /* backdrop-filter disabled for performance */
}
