/**
 * dark-theme.css - Calista Spa Dark Theme (Default)
 * Derived from Calista Spa reference: Obsidian Spruce, Mineral Slate, Warm Cedar Amber, Mineral Pool Teal
 */

:root,
[data-theme="dark"] {
  /* Surface & Base Colors */
  --bg-primary: #090e11;
  /* Deep Obsidian Spruce base */
  --bg-secondary: #0f181e;
  /* Mineral Slate elevated surface */
  --bg-tertiary: #15252e;
  /* Deep Cavern Slate container */
  --hero-div-bg: rgba(9, 14, 17, 0.5);
  /* Default dark theme background at 0.5 opacity */

  /* Glassmorphism & Elevation */
  --surface-glass: rgba(18, 30, 36, 0.72);
  --surface-glass-hover: rgba(25, 42, 50, 0.85);
  --border-glass: rgba(229, 169, 108, 0.16);
  --border-glass-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(229, 169, 108, 0.7);

  /* Primary Accent & Warmth (Sauna Wood & Amber) */
  --accent-primary: #e5a96c;
  /* Warm Sauna Amber */
  --accent-primary-hover: #f0be89;
  --accent-highlight: #f6d8b0;
  /* Champagne Wood Glow */
  --accent-bronze: #c27a42;
  /* Cedar Teak */
  --accent-amber-glow: rgba(229, 169, 108, 0.25);

  /* Secondary Accent (Mineral Pool & Aquatic Cyan) */
  --accent-secondary: #2dd4bf;
  /* Mineral Pool Teal */
  --accent-cyan: #38bdf8;
  /* Crystalline Water */
  --accent-pool-glow: rgba(45, 212, 191, 0.25);
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  /* Typography / Text Palette */
  --text-main: #fbf8f4;
  /* Warm Pearl Ivory */
  --text-secondary: #e3dad0;
  /* Linen Champagne */
  --text-muted: #8ea0a8;
  /* Mineral Slate Muted */
  --text-dim: #566a73;
  /* Deep Slate Ash */

  /* Shadows */
  --shadow-glass: 0 8px 32px 0 rgba(3, 8, 11, 0.55);
  --shadow-glow: 0 0 24px rgba(229, 169, 108, 0.22);
}

/* Base Body Application */
body[data-theme="dark"],
body:not([data-theme="light"]) {
  background-color: var(--bg-primary);
  color: var(--text-main);
}

/* Glass Panel Styling */
.glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
}

.glass-panel:hover {
  border-color: rgba(229, 169, 108, 0.3);
}

/* Container Semantic Utility Classes (Rule 5.3) */
.wrapper {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-glass);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(229, 169, 108, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.45);
}

.dialog {
  background: #0d171d;
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  padding: 2rem;
  backdrop-filter: blur(24px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .dialog {
    padding: 1.25rem 1rem;
  }
}

.popover {
  background: rgba(15, 24, 30, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  backdrop-filter: blur(16px);
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cells {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}

.drawer {
  background: rgba(13, 23, 29, 0.98);
  border-left: 1px solid var(--border-glass);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
}

.btnbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tabbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-glass-subtle);
  padding-bottom: 0.5rem;
}

.menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md, 12px);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(229, 169, 108, 0.12);
  border: 1px solid rgba(229, 169, 108, 0.3);
  color: var(--accent-highlight);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Layout Semantic Classes (Rule 5.4) */
.flex {
  display: flex;
}

.grid {
  display: grid;
}

.v-grid {
  display: grid;
  grid-auto-flow: row;
  gap: 1rem;
}

.h-grid {
  display: grid;
  grid-auto-flow: column;
  gap: 1rem;
}

/* Padding & Border Modifiers (Rule 5.6) */
.pad {
  padding: 1.5rem;
}

.half-pad {
  padding: 0.75rem;
}

.round {
  border-radius: 9999px;
}

.shadow {
  box-shadow: var(--shadow-glass);
}

.dotted {
  border-style: dotted !important;
}

/* Alignment Classes (Rule 5.7) */
.center {
  text-align: center;
  justify-content: center;
  align-items: center;
}

.top {
  align-items: flex-start;
}

.bottom {
  align-items: flex-end;
}

.right {
  text-align: right;
  justify-content: flex-end;
}

.left {
  text-align: left;
  justify-content: flex-start;
}

/* Hero container divs in Dark Mode - Default theme background at 0.5 opacity */
[data-theme="dark"] .hero div:not(.hero-bg-layer) {
  background: rgba(9, 14, 17, 0.5) !important;
  /*backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);*/
}