/* ==========================================
   Hotel Management System — Unified Themes
   3 Themes: Light, Dark, Blue (Ocean)
   Using CSS Custom Properties (data-theme)
   ========================================== */

/* ─────────────── LIGHT THEME ─────────────── */
[data-theme="light"],
:root[data-theme="light"] {
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.25);

  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.2);

  --success: #10b981;
  --success-light: #059669;
  --success-glow: rgba(16, 185, 129, 0.2);

  --danger: #ef4444;
  --danger-light: #dc2626;
  --danger-glow: rgba(239, 68, 68, 0.2);

  --warning: #f59e0b;
  --warning-light: #d97706;
  --warning-glow: rgba(245, 158, 11, 0.2);

  --info: #0284c7;
  --info-light: #0369a1;
  --info-glow: rgba(2, 132, 199, 0.2);

  /* Background Layers */
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-overlay: #e2e8f0;

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: #e2e8f0;
  --glass-hover: #f1f5f9;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0284c7, #4f46e5);
  --gradient-accent: linear-gradient(135deg, #f59e0b, #ea580c);
  --gradient-success: linear-gradient(135deg, #10b981, #059669);
  --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
  --gradient-bg: linear-gradient(135deg, #f8fafc, #e2e8f0);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 16px rgba(2, 132, 199, 0.2);

  /* Form-specific */
  --form-bg: #ffffff;
  --form-border: #cbd5e1;
  --form-focus-ring: rgba(2, 132, 199, 0.3);
  --form-placeholder: #94a3b8;
  --form-label: #334155;
  --form-input-text: #0f172a;

  /* Booking Card */
  --booking-card-bg: linear-gradient(135deg, #ffffff, #f0f9ff);
  --booking-card-border: #bae6fd;
  --booking-btn-gradient: linear-gradient(135deg, #0284c7, #0ea5e9);
  --booking-btn-hover: linear-gradient(135deg, #0369a1, #0284c7);
  --booking-btn-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

/* ─────────────── DARK THEME ─────────────── */
[data-theme="dark"],
:root[data-theme="dark"] {
  --primary: hsl(220, 85%, 57%);
  --primary-light: hsl(220, 85%, 67%);
  --primary-dark: hsl(220, 85%, 47%);
  --primary-glow: hsla(220, 85%, 57%, 0.35);

  --accent: hsl(45, 95%, 60%);
  --accent-light: hsl(45, 95%, 70%);
  --accent-glow: hsla(45, 95%, 60%, 0.3);

  --success: hsl(145, 65%, 50%);
  --success-light: hsl(145, 65%, 60%);
  --success-glow: hsla(145, 65%, 50%, 0.3);

  --danger: hsl(0, 75%, 58%);
  --danger-light: hsl(0, 75%, 68%);
  --danger-glow: hsla(0, 75%, 58%, 0.3);

  --warning: hsl(35, 90%, 58%);
  --warning-light: hsl(35, 90%, 68%);
  --warning-glow: hsla(35, 90%, 58%, 0.3);

  --info: hsl(190, 80%, 52%);
  --info-light: hsl(190, 80%, 62%);
  --info-glow: hsla(190, 80%, 52%, 0.3);

  /* Background Layers */
  --bg-base: hsl(222, 28%, 7%);
  --bg-surface: hsl(222, 25%, 11%);
  --bg-elevated: hsl(222, 22%, 15%);
  --bg-overlay: hsl(222, 20%, 19%);

  /* Glass Effect */
  --glass-bg: hsla(222, 30%, 100%, 0.04);
  --glass-border: hsla(222, 30%, 100%, 0.1);
  --glass-hover: hsla(222, 30%, 100%, 0.07);

  /* Text */
  --text-primary: hsl(220, 20%, 94%);
  --text-secondary: hsl(220, 15%, 65%);
  --text-muted: hsl(220, 12%, 45%);
  --text-inverse: hsl(222, 28%, 8%);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(220, 85%, 50%), hsl(260, 80%, 60%));
  --gradient-accent: linear-gradient(135deg, hsl(45, 95%, 55%), hsl(30, 95%, 60%));
  --gradient-success: linear-gradient(135deg, hsl(145, 65%, 45%), hsl(165, 65%, 50%));
  --gradient-danger: linear-gradient(135deg, hsl(0, 75%, 52%), hsl(340, 75%, 58%));
  --gradient-bg: linear-gradient(135deg, hsl(222, 28%, 7%), hsl(235, 30%, 9%));

  /* Shadows */
  --shadow-sm: 0 2px 8px hsla(222, 28%, 0%, 0.4);
  --shadow-md: 0 4px 20px hsla(222, 28%, 0%, 0.5);
  --shadow-lg: 0 8px 40px hsla(222, 28%, 0%, 0.6);
  --shadow-xl: 0 16px 60px hsla(222, 28%, 0%, 0.7);
  --shadow-primary: 0 4px 20px var(--primary-glow);

  /* Form-specific */
  --form-bg: hsl(222, 22%, 14%);
  --form-border: hsla(222, 30%, 100%, 0.12);
  --form-focus-ring: hsla(220, 85%, 57%, 0.4);
  --form-placeholder: hsl(220, 12%, 42%);
  --form-label: hsl(220, 15%, 70%);
  --form-input-text: hsl(220, 20%, 94%);

  /* Booking Card */
  --booking-card-bg: linear-gradient(135deg, hsl(222, 25%, 12%), hsl(235, 28%, 14%));
  --booking-card-border: hsla(220, 85%, 57%, 0.2);
  --booking-btn-gradient: linear-gradient(135deg, hsl(220, 85%, 50%), hsl(260, 80%, 58%));
  --booking-btn-hover: linear-gradient(135deg, hsl(220, 85%, 55%), hsl(260, 80%, 63%));
  --booking-btn-shadow: 0 4px 20px hsla(220, 85%, 57%, 0.4);
}

/* ─────────────── BLUE (OCEAN) THEME ─────────────── */
[data-theme="blue"],
:root[data-theme="blue"] {
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.35);

  --accent: #38bdf8;
  --accent-light: #7dd3fc;
  --accent-glow: rgba(56, 189, 248, 0.3);

  --success: #10b981;
  --success-light: #34d399;
  --success-glow: rgba(16, 185, 129, 0.3);

  --danger: #f43f5e;
  --danger-light: #fb7185;
  --danger-glow: rgba(244, 63, 94, 0.3);

  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-glow: rgba(245, 158, 11, 0.3);

  --info: #06b6d4;
  --info-light: #22d3ee;
  --info-glow: rgba(6, 182, 212, 0.3);

  /* Background Layers */
  --bg-base: #07192f;
  --bg-surface: #0f2a4a;
  --bg-elevated: #173860;
  --bg-overlay: #1e4776;

  /* Glass Effect */
  --glass-bg: rgba(15, 42, 74, 0.65);
  --glass-border: rgba(56, 189, 248, 0.18);
  --glass-hover: rgba(56, 189, 248, 0.12);

  /* Text */
  --text-primary: #f0f9ff;
  --text-secondary: #bae6fd;
  --text-muted: #7dd3fc;
  --text-inverse: #07192f;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0284c7, #2563eb);
  --gradient-accent: linear-gradient(135deg, #06b6d4, #0284c7);
  --gradient-success: linear-gradient(135deg, #059669, #10b981);
  --gradient-danger: linear-gradient(135deg, #e11d48, #f43f5e);
  --gradient-bg: linear-gradient(135deg, #07192f, #0c2d4f);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(2, 25, 47, 0.5);
  --shadow-md: 0 4px 20px rgba(2, 25, 47, 0.6);
  --shadow-lg: 0 8px 40px rgba(2, 25, 47, 0.7);
  --shadow-xl: 0 16px 60px rgba(2, 25, 47, 0.8);
  --shadow-primary: 0 4px 20px rgba(2, 132, 199, 0.35);

  /* Form-specific */
  --form-bg: rgba(15, 42, 74, 0.7);
  --form-border: rgba(56, 189, 248, 0.22);
  --form-focus-ring: rgba(56, 189, 248, 0.35);
  --form-placeholder: rgba(125, 211, 252, 0.5);
  --form-label: #bae6fd;
  --form-input-text: #f0f9ff;

  /* Booking Card */
  --booking-card-bg: linear-gradient(135deg, #0f2a4a, #173860);
  --booking-card-border: rgba(56, 189, 248, 0.25);
  --booking-btn-gradient: linear-gradient(135deg, #0284c7, #06b6d4);
  --booking-btn-hover: linear-gradient(135deg, #0369a1, #0284c7);
  --booking-btn-shadow: 0 4px 20px rgba(2, 132, 199, 0.45);
}

/* ─────────────── BOOKING FORM STYLES ─────────────── */
.booking-form-card {
  background: var(--booking-card-bg);
  border: 1px solid var(--booking-card-border);
  border-radius: var(--radius-xl, 24px);
  padding: 32px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 24px 24px 0 0;
}

.booking-form-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: var(--primary-glow);
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
  filter: blur(40px);
}

.booking-form-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.booking-form-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.booking-form-title .title-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-primary);
}

/* Form Layout */
.booking-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.booking-form-grid .form-group.full-width {
  grid-column: 1 / -1;
}

/* Enhanced Form Controls for Booking */
.booking-form-card .form-label {
  color: var(--form-label);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.booking-form-card .form-label .label-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.booking-form-card .form-control {
  background: var(--form-bg);
  border: 1.5px solid var(--form-border);
  color: var(--form-input-text);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 0.92rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-form-card .form-control::placeholder {
  color: var(--form-placeholder);
}

.booking-form-card .form-control:hover {
  border-color: var(--primary);
}

.booking-form-card .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--form-focus-ring);
  background: var(--form-bg);
  outline: none;
}

/* Date inputs special styling */
.booking-form-card input[type="date"] {
  position: relative;
}

.booking-form-card input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  filter: invert(0.5);
}

[data-theme="dark"] .booking-form-card input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="blue"] .booking-form-card input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

.booking-form-card input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Number inputs */
.booking-form-card input[type="number"] {
  -moz-appearance: textfield;
}

.booking-form-card input[type="number"]::-webkit-inner-spin-button,
.booking-form-card input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Select styling in booking form */
.booking-form-card select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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: left 14px center;
  padding-left: 40px;
}

[data-theme="dark"] .booking-form-card select.form-control,
[data-theme="blue"] .booking-form-card select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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");
}

/* Submit Button */
.booking-submit-section {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-booking-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--booking-btn-gradient);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--booking-btn-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-booking-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-booking-submit:hover {
  background: var(--booking-btn-hover);
  transform: translateY(-2px);
  box-shadow: var(--booking-btn-shadow), 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-booking-submit:hover::before {
  opacity: 1;
}

.btn-booking-submit:active {
  transform: translateY(0) scale(0.98);
}

.btn-booking-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-booking-reset:hover {
  border-color: var(--danger);
  color: var(--danger-light);
  background: var(--danger-glow);
}

/* Divider line in booking form */
.booking-form-divider {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 24px 0;
  opacity: 0.6;
}

/* Notes textarea */
.booking-form-card textarea.form-control {
  min-height: 90px;
  resize: vertical;
  line-height: 1.6;
}

/* ─────────────── RESPONSIVE (Booking Form) ─────────────── */
@media (max-width: 768px) {
  .booking-form-grid {
    grid-template-columns: 1fr;
  }

  .booking-form-card {
    padding: 20px;
  }

  .booking-submit-section {
    flex-direction: column;
  }

  .btn-booking-submit,
  .btn-booking-reset {
    width: 100%;
    justify-content: center;
  }
}

/* ─────────────── THEME TRANSITION SMOOTHING ─────────────── */
html[data-theme] *,
html[data-theme] *::before,
html[data-theme] *::after {
  transition: background-color 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
}
