/*
 * didi.css — Didihome's design system, as a set of switchable skins.
 *
 * Structure: .aero-nav / .aero-btn / .aero-panel below define shared LAYOUT
 * only (flex rules, padding, radius shape) - skin-independent. Each skin is
 * then a body.didi-style-<name> block that supplies the actual look
 * (background image, colors, blur, shadows) for those same elements. A page
 * switches skins just by changing which didi-style-* class is on <body> -
 * see backgroundControl.js / settings.html for the picker that drives this.
 *
 * Skins:
 *   didi-style-original - the pre-redesign flat Didihome look, restored
 *   didi-style-classic  - bright glossy Frutiger Aero (frutiger1.jpeg)
 *   didi-style-glass     - modern frosted "liquid glass" (aero1.jpg)
 *   didi-style-dark      - dark theme, glowing glass (frutiger3.png)
 *   didi-style-green     - vibrant nature swoosh (frutiger2.png)
 */

:root {
  --aero-font: "Segoe UI", "Century Gothic", Verdana, sans-serif;
  --aero-radius-lg: 22px;
  --aero-radius-pill: 999px;
}

/* ---------- shared structure (skin-independent) ---------- */

body[class*="didi-style-"] {
  font-family: var(--aero-font);
  color: var(--aero-navy, #222);
  min-height: 100vh;
  margin: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.aero-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.aero-nav .aero-btn {
  padding: 0.5em 1.1em;
  font-size: 0.9rem;
}

.aero-nav-left,
.aero-nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.aero-nav-right {
  margin-left: auto;
}

.aero-nav-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.aero-btn {
  position: relative;
  display: inline-block;
  font-family: var(--aero-font);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.2, .8, .2, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.aero-panel {
  padding: 2rem;
}

@media (max-width: 700px) {
  .aero-nav {
    justify-content: center;
  }
  .aero-nav-right {
    margin-left: 0;
  }
}

/* ---------- floating style switcher ----------
   Deliberately skin-agnostic (same neutral glass look regardless of which
   didi-style-* is active) so it reads as a persistent system control
   rather than part of any one skin. Panel content is generated by
   initStyleSwitcher() in backgroundControl.js from STYLE_LABELS - a page
   only needs the toggle button + an empty panel container, see index.html. */

.style-switcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: var(--aero-font);
}

.style-switcher-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.style-switcher-toggle:hover {
  transform: scale(1.08);
}

.style-switcher-panel {
  position: absolute;
  bottom: 64px;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.style-switcher-panel.open {
  display: flex;
}

.style-switcher-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--aero-font);
  font-size: 0.9rem;
  color: #222;
  text-align: left;
  transition: background 0.15s ease;
}

.style-switcher-option:hover {
  background: rgba(0, 0, 0, 0.06);
}

.style-switcher-option.active {
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.style-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.style-swatch[data-style="didi-style-original"] { background: linear-gradient(135deg, #f0f0f0 50%, #060fbf 50%); }
.style-swatch[data-style="didi-style-classic"]  { background: linear-gradient(135deg, #ffffff, #3fa9f5); }
.style-swatch[data-style="didi-style-glass"]    { background: linear-gradient(135deg, #a8d8ff, #1a6fc4); }
.style-swatch[data-style="didi-style-dark"]     { background: linear-gradient(135deg, #1a1a1a, #6fc3ff); }
.style-swatch[data-style="didi-style-green"]    { background: linear-gradient(135deg, #baf76f, #237a13); }

/* =========================================================================
   Skin: Original Didihome (flat) - the pre-redesign look, restored exactly
   ========================================================================= */

body.didi-style-original {
  --aero-navy: #000000;
  --aero-accent: #007BFF;
  background: #f0f0f0;
}

body.didi-style-original .aero-nav {
  background: rgba(238, 238, 238, 0.85);
  border-bottom: 1px solid #ccc;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* The original site's nav buttons were their own flat grey style
   (.ribbon-nav button), distinct from the generic blue button {} used
   elsewhere on the page - same distinction restored here. */
body.didi-style-original .aero-nav .aero-btn {
  border-radius: 4px;
  background-color: #f2f2f2;
  color: #222;
  border: 1px solid #bbb;
  box-shadow: none;
  font-weight: normal;
  padding: 0.4rem 0.75rem;
}

body.didi-style-original .aero-nav .aero-btn:hover {
  background-color: #ddd;
  box-shadow: none;
  transform: none;
}

body.didi-style-original .aero-nav .aero-btn.aero-accent {
  background-color: #f2f2f2;
  color: #222;
}

body.didi-style-original .aero-btn {
  border-radius: 8px;
  background-color: #060fbf;
  color: white;
  border: 1px solid #0e1ebf;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
  font-weight: 500;
}

body.didi-style-original .aero-btn::before {
  display: none;
}

body.didi-style-original .aero-btn:hover {
  background-color: #3949f9;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px) scale(1.01);
}

body.didi-style-original .aero-btn.aero-accent {
  background-color: #060fbf;
}

body.didi-style-original .aero-panel {
  background-color: #f0f0f0;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

body.didi-style-original footer {
  background-color: #007BFF;
  color: #FFF;
}

/* =========================================================================
   Skin: Aero Classic - bright glossy Frutiger Aero
   ========================================================================= */

body.didi-style-classic {
  --aero-navy: #0a3d66;
  --aero-accent: #0a5ca8;
  background-image: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(63,169,245,0.25)), url("/backgrounds/frutiger1.jpeg");
}

body.didi-style-classic .aero-nav {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.5));
  border-bottom: 1px solid rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(10,61,102,.12);
}

body.didi-style-classic .aero-btn {
  color: var(--aero-navy);
  border: 1px solid #0a5ca8;
  border-radius: var(--aero-radius-pill);
  padding: 0.6em 1.5em;
  background: linear-gradient(180deg, #fff 0%, #dff0ff 45%, #4fa8e8 46%, #0a5ca8 100%);
  box-shadow: 0 3px 10px rgba(10,61,102,.18), inset 0 1px 0 rgba(255,255,255,.8);
  overflow: hidden;
}

body.didi-style-classic .aero-btn::before {
  content: "";
  position: absolute;
  top: 2px; left: 8%;
  width: 84%; height: 38%;
  border-radius: 999px 999px 60% 60%;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0));
  pointer-events: none;
}

body.didi-style-classic .aero-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(10,61,102,.24), inset 0 1px 0 rgba(255,255,255,.85);
}

body.didi-style-classic .aero-btn.aero-accent {
  border-color: #2f8f1f;
  background: linear-gradient(180deg,#fff 0%, #eaffd6 45%, #baf76f 46%, #5ec93f 100%);
}

body.didi-style-classic .aero-panel {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--aero-radius-lg);
  box-shadow: 0 8px 22px rgba(10,61,102,.2), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.didi-style-classic footer {
  background: linear-gradient(180deg, #0a5ca8, #0a3d66);
  color: #eaf6ff;
  box-shadow: 0 -2px 10px rgba(10,61,102,.3);
}

/* =========================================================================
   Skin: Liquid Glass - modern frosted/refractive material
   ========================================================================= */

body.didi-style-glass {
  --aero-navy: #0d3b66;
  --aero-accent: #1a6fc4;
  background-image: linear-gradient(180deg, rgba(234,246,255,0.35) 0%, rgba(79,168,232,0.25) 100%), url("/backgrounds/aero1.jpg");
}

body.didi-style-glass .aero-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(13, 59, 102, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.didi-style-glass .aero-btn {
  color: var(--aero-navy);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--aero-radius-pill);
  padding: 0.6em 1.5em;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    0 4px 14px rgba(13, 59, 102, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(13, 59, 102, 0.06);
}

body.didi-style-glass .aero-btn:hover {
  background: rgba(255, 255, 255, 0.46);
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(13, 59, 102, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(13, 59, 102, 0.08);
}

body.didi-style-glass .aero-btn:active {
  transform: translateY(0) scale(0.97);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 2px 6px rgba(13, 59, 102, 0.18);
}

body.didi-style-glass .aero-btn.aero-accent {
  color: #2f8f1f;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(190, 247, 111, 0.28);
}

body.didi-style-glass .aero-btn.aero-accent:hover {
  background: rgba(190, 247, 111, 0.42);
}

body.didi-style-glass .aero-panel {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 26px;
  box-shadow: 0 8px 24px rgba(13, 59, 102, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.didi-style-glass footer {
  background: linear-gradient(180deg, #1a6fc4, #0d3b66);
  color: #eaf6ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow: 0 -2px 10px rgba(13, 59, 102, 0.3);
}

/* =========================================================================
   Skin: Aero Dark - dark theme, glowing glass
   ========================================================================= */

body.didi-style-dark {
  --aero-navy: #eaf1ff;
  --aero-accent: #6fc3ff;
  background-image: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.6)), url("/backgrounds/frutiger3.png");
}

body.didi-style-dark .aero-nav {
  background: rgba(20,22,28,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 2px 16px rgba(0,0,0,.4);
}

body.didi-style-dark .aero-btn {
  color: var(--aero-navy);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--aero-radius-pill);
  padding: 0.6em 1.5em;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
}

body.didi-style-dark .aero-btn:hover {
  background: rgba(111,195,255,.18);
  box-shadow: 0 0 20px rgba(111,195,255,0.35), inset 0 1px 0 rgba(255,255,255,.2);
  transform: translateY(-1px);
}

body.didi-style-dark .aero-btn.aero-accent {
  border-color: rgba(111,195,255,.5);
  background: rgba(111,195,255,.14);
  color: #bfe6ff;
}

body.didi-style-dark .aero-btn.aero-accent:hover {
  background: rgba(111,195,255,.26);
}

body.didi-style-dark .aero-panel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--aero-radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

body.didi-style-dark .aero-panel p {
  color: #b9c7d8;
}

body.didi-style-dark footer {
  background: rgba(10,11,15,0.75);
  color: #b9c7d8;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* =========================================================================
   Skin: Vibrant Green - nature swoosh
   ========================================================================= */

body.didi-style-green {
  --aero-navy: #0d3b1a;
  --aero-accent: #237a13;
  background-image: linear-gradient(180deg, rgba(255,255,255,.1), rgba(20,80,20,.2)), url("/backgrounds/frutiger2.png");
}

body.didi-style-green .aero-nav {
  background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.45));
  border-bottom: 1px solid rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(13,59,26,.18);
}

body.didi-style-green .aero-btn {
  color: var(--aero-navy);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--aero-radius-pill);
  padding: 0.6em 1.5em;
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 4px 14px rgba(13,59,26,.16), inset 0 1px 0 rgba(255,255,255,.6);
}

body.didi-style-green .aero-btn:hover {
  background: rgba(255,255,255,.55);
  transform: translateY(-1px);
}

body.didi-style-green .aero-btn.aero-accent {
  color: #fff;
  border-color: #237a13;
  background: linear-gradient(180deg, #baf76f, #5ec93f);
}

body.didi-style-green .aero-btn.aero-accent:hover {
  filter: brightness(1.05);
}

body.didi-style-green .aero-panel {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: var(--aero-radius-lg);
  box-shadow: 0 8px 24px rgba(13,59,26,.2), inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.didi-style-green footer {
  background: linear-gradient(180deg, #5ec93f, #237a13);
  color: #eaffd6;
  box-shadow: 0 -2px 10px rgba(13,59,26,.3);
}
