/* ==========================================================================
   AeroUI v1.1 - Multi-Theme Frutiger Aero CSS Component Library
   ========================================================================== */

:root,
[data-theme="aero-day"] {
  --aero-font: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", Arial, sans-serif;

  /* Core Text & Borders */
  --aero-text: #0b2b40;
  --aero-text-heading: #063966;
  --aero-text-muted: #2c5d7c;
  --aero-border-glass: rgba(255, 255, 255, 0.9);
  --aero-border-accent: rgba(0, 136, 230, 0.4);
  --aero-shadow-color: rgba(0, 75, 145, 0.18);

  /* Radii */
  --aero-radius-pill: 999px;
  --aero-radius-card: 16px;
  --aero-radius-box: 12px;

  /* Sky & Aurora Background */
  --aero-bg-sky:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.85) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(126, 232, 118, 0.55) 0%, transparent 50%),
    linear-gradient(180deg, #4facfe 0%, #00f2fe 52%, #7ee8fa 100%);

  /* Glass Surfaces */
  --aero-glass-navbar: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(215, 243, 255, 0.55) 100%);
  --aero-glass-card: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.58) 35%,
    rgba(225, 245, 255, 0.65) 100%
  );
  --aero-glass-box: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(218, 246, 255, 0.68) 100%
  );

  /* Inputs */
  --aero-input-bg: rgba(255, 255, 255, 0.88);
  --aero-input-focus-bg: #ffffff;

  /* Gel Gradients */
  --aero-btn-text: #05335c;
  --aero-btn-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  --aero-gel-default: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(214, 244, 255, 0.86) 49%,
    rgba(173, 229, 255, 0.86) 51%,
    rgba(224, 248, 255, 0.96) 100%
  );
  --aero-gel-blue: linear-gradient(180deg, #8ce0ff 0%, #29a3ff 49%, #0077e6 51%, #33bbff 100%);
  --aero-gel-green: linear-gradient(180deg, #b8f79e 0%, #5cd647 49%, #2eb81d 51%, #6be356 100%);
  --aero-gel-red: linear-gradient(180deg, #ff9e9e 0%, #f24444 49%, #cc1414 51%, #f55656 100%);
}

/* ==========================================================================
   Theme 2: Aero After Dark (Midnight Vista & Aurora Borealis)
   ========================================================================== */
[data-theme="aero-dark"] {
  --aero-text: #e2f4ff;
  --aero-text-heading: #8ce0ff;
  --aero-text-muted: #8ab8d6;
  --aero-border-glass: rgba(110, 210, 255, 0.35);
  --aero-border-accent: rgba(0, 195, 255, 0.45);
  --aero-shadow-color: rgba(0, 10, 25, 0.65);

  /* Midnight Aurora Sky */
  --aero-bg-sky:
    radial-gradient(circle at 20% 15%, rgba(0, 225, 255, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(56, 239, 125, 0.22) 0%, transparent 50%),
    linear-gradient(180deg, #040d1a 0%, #09203f 50%, #0d324d 100%);

  /* Smoked Vista Obsidian Glass */
  --aero-glass-navbar: linear-gradient(180deg, rgba(20, 48, 82, 0.78) 0%, rgba(8, 22, 42, 0.72) 100%);
  --aero-glass-card: linear-gradient(
    180deg,
    rgba(28, 62, 102, 0.65) 0%,
    rgba(12, 28, 52, 0.62) 38%,
    rgba(16, 42, 74, 0.72) 100%
  );
  --aero-glass-box: linear-gradient(
    180deg,
    rgba(8, 20, 38, 0.72) 0%,
    rgba(16, 38, 68, 0.65) 100%
  );

  /* Dark Inputs */
  --aero-input-bg: rgba(7, 19, 36, 0.75);
  --aero-input-focus-bg: rgba(12, 30, 56, 0.95);

  /* Dark Smoked Gel Default Button */
  --aero-btn-text: #e2f4ff;
  --aero-btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  --aero-gel-default: linear-gradient(
    180deg,
    rgba(75, 130, 185, 0.55) 0%,
    rgba(30, 65, 105, 0.65) 49%,
    rgba(15, 38, 68, 0.78) 51%,
    rgba(38, 82, 130, 0.65) 100%
  );
  --aero-gel-blue: linear-gradient(180deg, #5cc8ff 0%, #0088ee 49%, #005bb5 51%, #1ca3ff 100%);
  --aero-gel-green: linear-gradient(180deg, #8ef57a 0%, #32b824 49%, #1e8a14 51%, #4cd93b 100%);
  --aero-gel-red: linear-gradient(180deg, #ff7a7a 0%, #d92626 49%, #9e1111 51%, #e63939 100%);
}

/* ==========================================================================
   Theme 3: Aero Sunset (Golden Hour & Coral Glass)
   ========================================================================== */
[data-theme="aero-sunset"] {
  --aero-text: #3d1810;
  --aero-text-heading: #7a230d;
  --aero-text-muted: #8c4532;
  --aero-border-glass: rgba(255, 245, 235, 0.9);
  --aero-border-accent: rgba(235, 105, 55, 0.45);
  --aero-shadow-color: rgba(145, 45, 15, 0.2);
  --aero-gel-green: linear-gradient(180deg, #b8f79e 0%, #5cd647 49%, #2eb81d 51%, #6be356 100%);
  --aero-gel-red: linear-gradient(180deg, #ff9e9e 0%, #f24444 49%, #cc1414 51%, #f55656 100%);

  --aero-bg-sky:
    radial-gradient(circle at 20% 15%, rgba(255, 250, 210, 0.85) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(255, 110, 140, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, #ff9a44 0%, #fc6076 52%, #ffd194 100%);

  --aero-glass-navbar: linear-gradient(180deg, rgba(255, 248, 240, 0.8) 0%, rgba(255, 224, 205, 0.6) 100%);
  --aero-glass-card: linear-gradient(
    180deg,
    rgba(255, 250, 245, 0.85) 0%,
    rgba(255, 235, 222, 0.62) 35%,
    rgba(255, 218, 200, 0.68) 100%
  );
  --aero-glass-box: linear-gradient(
    180deg,
    rgba(255, 250, 245, 0.88) 0%,
    rgba(255, 224, 208, 0.7) 100%
  );

  --aero-input-bg: rgba(255, 252, 248, 0.88);
  --aero-input-focus-bg: #ffffff;

  --aero-btn-text: #6e1e0a;
  --aero-btn-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  --aero-gel-default: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 228, 212, 0.86) 49%,
    rgba(255, 198, 172, 0.86) 51%,
    rgba(255, 235, 222, 0.96) 100%
  );
  --aero-gel-blue: linear-gradient(180deg, #ffb870 0%, #ff7326 49%, #d94800 51%, #ff8c42 100%);
}

/* ==========================================================================
   Global Reset & Component Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

.aero-theme {
  margin: 0;
  padding: 12px;
  min-height: 100vh;
  font-family: var(--aero-font);
  color: var(--aero-text);
  background: var(--aero-bg-sky);
  background-attachment: fixed;
  transition: background 0.3s ease, color 0.25s ease;
}

/* 1. Navbar */
.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--aero-glass-navbar);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--aero-border-glass);
  box-shadow:
    0 6px 20px var(--aero-shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
}

/* 2. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--aero-radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  color: var(--aero-btn-text);
  text-shadow: var(--aero-btn-shadow);
  background: var(--aero-gel-default);
  border: 1px solid var(--aero-border-accent);
  box-shadow:
    0 3px 6px var(--aero-shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 5px 12px rgba(72, 219, 112, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 35, 80, 0.8);
  border-color: rgba(0, 115, 230, 0.85);
  background: var(--aero-gel-blue);
}

.btn-success {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(15, 70, 10, 0.8);
  border-color: rgba(31, 143, 17, 0.85);
  background: var(--aero-gel-green);
}

.btn-error {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(90, 5, 5, 0.8);
  border-color: rgba(179, 18, 23, 0.85);
  background: var(--aero-gel-red);
}

.btn-error:hover {
  box-shadow: 0 4px 10px rgba(242, 68, 68, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.btn-xs { padding: 3px 10px; font-size: 12px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 11px 24px; font-size: 16px; }
.btn-orb { padding-left: 6px; }

.orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  color: #063966;
  background: linear-gradient(180deg, #ffffff 0%, #9be3ff 50%, #3bb2ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px var(--aero-shadow-color), inset 0 1px 1px rgba(255, 255, 255, 1);
}

/* 3. Glass Cards & Boxes */
.card {
  position: relative;
  width: 100%;
  padding: 16px;
  border-radius: var(--aero-radius-card);
  background: var(--aero-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--aero-border-glass);
  box-shadow:
    0 8px 24px var(--aero-shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 140, 255, 0.25);
}

.card + .card,
.aero-box + .aero-box {
  margin-top: 16px;
}

.card-title {
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--aero-text-heading);
  border-bottom: 1px solid var(--aero-border-accent);
}

.aero-box {
  padding: 14px;
  border-radius: var(--aero-radius-box);
  background: var(--aero-glass-box);
  border: 1px solid var(--aero-border-accent);
  box-shadow:
    inset 0 2px 5px rgba(0, 20, 45, 0.15),
    0 2px 6px var(--aero-shadow-color);
}

/* 4. Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--aero-radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--aero-btn-text);
  text-shadow: var(--aero-btn-shadow);
  background: var(--aero-gel-default);
  border: 1px solid var(--aero-border-accent);
  box-shadow: 0 2px 4px var(--aero-shadow-color);
}

.badge-primary {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 35, 80, 0.8);
  border-color: rgba(0, 115, 230, 0.85);
  background: var(--aero-gel-blue);
}

.badge-success {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(15, 70, 10, 0.8);
    border-color: rgba(31, 143, 17, 0.85);
    background: var(--aero-gel-green);
}
.badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #66d9ff 45%, #0077e6 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
}
/* 5. Form Controls */
.input, .textarea, .file-input, .select {
    width: 100%;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--aero-text);
    border-radius: var(--aero-radius-pill);
    border: 1px solid var(--aero-border-accent);
    background: var(--aero-input-bg);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 20, 45, 0.16);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.textarea { border-radius: var(--aero-radius-box); resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
    background: var(--aero-input-focus-bg);
    border-color: #0099ff;
    box-shadow: 0 0 8px rgba(0, 180, 255, 0.65), inset 0 1px 3px rgba(0, 20, 45, 0.12);
}

.btn:focus-visible,
.drop-zone:focus-visible {
    outline: 2px solid #0099ff;
    outline-offset: 2px;
}

.file-input { padding: 4px 10px 4px 4px; font-size: 12.5px; cursor: pointer; }
.file-input::file-selector-button {
    margin-right: 10px;
    padding: 5px 12px;
    border-radius: var(--aero-radius-pill);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 35, 80, 0.8);
    border: 1px solid rgba(0, 115, 230, 0.85);
    background: var(--aero-gel-blue);
}
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border-radius: var(--aero-radius-box);
    border: 2px dashed var(--aero-border-accent);
    background: var(--aero-glass-box);
    cursor: pointer;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--aero-text-heading);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #2eb81d;
    box-shadow: 0 0 12px rgba(72, 219, 112, 0.55);
}

/* 6. Media Player */
.media-player {
    padding: 12px;
    border-radius: var(--aero-radius-box);
    background: var(--aero-glass-box);
    border: 1px solid var(--aero-border-accent);
    box-shadow: inset 0 2px 5px rgba(0, 20, 45, 0.12);
}
.progress-track {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: var(--aero-radius-pill);
    background: var(--aero-input-bg);
    border: 1px solid var(--aero-border-accent);
}
.progress-fill {
    height: 100%;
    border-radius: var(--aero-radius-pill);
    background: linear-gradient(180deg, #b8f79e 0%, #48db70 50%, #1f9e38 100%);
}
.eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.eq-bars i {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, #48db70 0%, #0077e6 100%);
    animation: aeroEqBounce 0.9s ease-in-out infinite alternate;
}
.eq-bars i:nth-child(2) { animation-delay: 0.25s; }
.eq-bars i:nth-child(3) { animation-delay: 0.5s; }
    @keyframes aeroEqBounce {
    0% { height: 3px; }
    100% { height: 12px; }
}

.aero-grid-2 > .card,
.aero-grid-3 > .card,
.aero-layout-blog > .card {
  margin-top: 0;
}

.card p {
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.card p:last-child {
  margin-bottom: 0;
}

.aero-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Prevent iOS auto-zoom on mobile inputs and stack navbar search cleanly */
@media (max-width: 599px) {
    .input,
    .textarea,
    .select {
        font-size: 16px;
    }

    .navbar .input {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-top: 4px;
    }
}

/* ==========================================================================
   7. Responsive Layout Utilities & Mobile Adjustments
   ========================================================================== */

/* Centered Page Container */
.aero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px;
}

@media (min-width: 768px) {
  .aero-theme {
    padding: 20px;
  }
}

@media (min-width: 768px) {
  .aero-container {
    padding: 20px;
  }
  .navbar {
    margin-bottom: 22px;
  }
}

/* Responsive Card Grids (1 col on mobile -> 2 or 3 cols on larger screens) */
.aero-grid-2,
.aero-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .aero-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 900px) {
  .aero-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Classic 3-Column Frutiger Aero Blog Shell (Sidebar | Main Feed | Sidebar) */
.aero-layout-blog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 790px) {
  .aero-layout-blog {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .aero-layout-blog {
    grid-template-columns: minmax(0, 360px) minmax(0, 700px) minmax(0, 360px);
    justify-content: center;
  }
}

/* Mobile Navbar & Input Ergonomics */
@media (max-width: 599px) {
  .input,
  .textarea,
  .select {
    font-size: 16px; /* Prevents iOS Safari from auto-zooming on focus */
  }

  .navbar .input {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
}

@media (min-width: 600px) {
  .navbar .input {
    width: auto;
    margin-left: auto;
  }
}

/* Optional Reduced Motion Support for Equalizer & Hover Transitions */
@media (prefers-reduced-motion: reduce) {
  .eq-bars i {
    animation: none;
    height: 8px;
  }

  .btn,
  .input,
  .textarea,
  .select,
  .drop-zone {
    transition: none;
  }
}

/* Code Snippet Box for Documentation */
.code-block {
  margin: 8px 0 14px 0;
  padding: 12px 14px;
  border-radius: var(--aero-radius-box);
  background: var(--aero-input-bg);
  border: 1px solid var(--aero-border-accent);
  box-shadow: inset 0 2px 5px rgba(0, 20, 45, 0.14);
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--aero-text);
  overflow-x: auto;
  white-space: pre;
}
