/* ============================================================
   LELE HOME – gemeinsames Stylesheet
   Wird von allen Seiten geladen. Header, Footer und Navigation
   werden von lele.js erzeugt und hier gestaltet.
   ============================================================ */

:root {
  --bg-canvas: #cccfce;
  --card-bg: #e6e8e7;
  --text-main: #111111;
  --text-dark-gray: #1e1e1e;
  --white: #ffffff;

  --accent-orange: #ff5522;
  --accent-orange-muted: #e88d72;
  --accent-yellow: #f2ce6e;
  --accent-sage: #9bb09e;
  --accent-blue: #70a1ff;
  --accent-pink: #f766b1;
  --accent-purple: #b166f7;
  --accent-cyan: #70d6ff;
  --accent-blue-dark: #0000ff;

  --radius-large: 36px;

  /* Von lele.js je Seite gesetzt */
  --page-accent: var(--accent-orange);
  --page-fg: var(--white);

  /* Masse, aus denen sich die Seitenabstaende ableiten */
  --header-h: 74px;
  --footer-h: 140px;
  --edge: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;

  /* Platz fuer den fixierten Header oben und Footer unten */
  padding: calc(var(--header-h) + var(--edge) + 24px) var(--edge)
           calc(var(--footer-h) + var(--edge) + 24px) var(--edge);
}


.dashboard-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
}

/* ---------------- HEADER ---------------- */

header.header-block {
  position: fixed;
  top: var(--edge);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--edge) * 2);
  max-width: 1200px;
  z-index: 1000;

  background-color: var(--accent-orange);
  color: var(--white);
  border-radius: var(--radius-large);
  padding: 20px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}


.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}

.header-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--white);
  opacity: 0.95;
}

.header-widget .divider { opacity: 0.6; }
#weatherDisplay { font-weight: 600; text-transform: capitalize; }

/* ---------------- FEEDBACK ---------------- */

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}
.feedback-btn:hover { background: rgba(255, 255, 255, 0.4); }
.feedback-btn svg { display: block; }

.feedback-panel {
  position: fixed;
  top: calc(var(--edge) + var(--header-h) + 8px);
  right: var(--edge);
  width: min(320px, calc(100% - var(--edge) * 2));
  max-width: 320px;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  z-index: 1100;

  display: flex;
  flex-direction: column;
  gap: 10px;

  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s ease;
}

.feedback-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.feedback-textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
  outline: none;
}
.feedback-textarea::placeholder { color: var(--text-main); opacity: 0.45; }

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-status {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.6;
}

.feedback-cancel, .feedback-send {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: inherit;
}
.feedback-cancel { background: rgba(0, 0, 0, 0.08); color: var(--text-main); }
.feedback-send { background: var(--accent-orange); color: #fff; }
.feedback-send:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 900px) {
  .feedback-btn { width: 24px; height: 24px; }
  .feedback-panel {
    top: calc(var(--edge) + var(--header-h) + 6px);
    right: var(--edge);
    left: var(--edge);
    width: auto;
    max-width: none;
  }
  .feedback-textarea { font-size: 16px; min-height: 76px; }
}

/* ---------------- APP / IFRAME ---------------- */

.app-content {
  width: 100%;
  margin-bottom: 24px;
}

.app-iframe {
  width: 100%;
  height: 800px;              /* Startwert, lele.js passt an */
  border: none;
  background: transparent;
  display: block;
  transition: height 0.2s ease;
}

/* ---------------- FOOTER ---------------- */

footer.dashboard-footer-card {
  position: fixed;
  bottom: var(--edge);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--edge) * 2);
  max-width: 1200px;
  z-index: 1000;

  background-color: var(--page-accent);
  color: var(--page-fg);
  border-radius: var(--radius-large);
  padding: 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}


.footer-left {
  background-color: var(--page-accent);
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding-left: 40px;
  padding-right: 30px;
  flex-shrink: 0;
  z-index: 30;
  border-top-left-radius: var(--radius-large);
  border-bottom-left-radius: var(--radius-large);
  position: relative;
}

.footer-number-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 90px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -4px;
  color: var(--page-fg);
  cursor: pointer;
  padding: 0;
  outline: none;
  display: flex;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-number-btn:hover { transform: scale(1.05); }

.footer-label {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--page-fg);
  white-space: nowrap;
}

/* ---------------- WETTER IM FOOTER ---------------- */

.footer-cities-weather {
  position: absolute;
  right: 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 10;
  pointer-events: none;
}

.city-weather-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.city-name {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--page-fg);
  opacity: 0.8;
}

.city-temp {
  font-size: 14px;
  font-weight: 800;
  color: var(--page-fg);
}

/* ---------------- FÄCHER-NAVIGATION ---------------- */

.fan-container {
  display: flex;
  align-items: center;
  height: 100%;
  flex-grow: 1;
  position: relative;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 20;
}

.fan-container.open { clip-path: inset(0 0% 0 0); }

.fan-tile {
  height: 100%;
  flex: 1;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: 24px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-left: -18px;
  box-shadow: -8px 0 16px rgba(0, 0, 0, 0.12);
  transform: translateX(-100%);
  pointer-events: none;
  text-decoration: none;
  transition: transform 0.38s cubic-bezier(0.25, 1, 0.5, 1), filter 0.2s ease;
}

.fan-tile:first-child {
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}
.fan-tile:last-child {
  border-top-right-radius: var(--radius-large);
  border-bottom-right-radius: var(--radius-large);
  margin-right: -2px;
}

.fan-tile:nth-child(1) { z-index: 26; }
.fan-tile:nth-child(2) { z-index: 25; }
.fan-tile:nth-child(3) { z-index: 24; }
.fan-tile:nth-child(4) { z-index: 23; }
.fan-tile:nth-child(5) { z-index: 22; }
.fan-tile:nth-child(6) { z-index: 21; }

.fan-tile:hover { filter: brightness(1.08); }

.fan-container.open .fan-tile {
  transform: translateX(0);
  pointer-events: auto;
}

.tile-num {
  font-size: 70px;
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -4px;
  color: var(--text-dark-gray);
}

.tile-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dark-gray);
  opacity: 0.8;
  margin-top: 4px;
  text-align: left;
}

/* ============================================================
   ZWISCHENGROESSE: 901–1200px
   Footer wird flacher, Wetter bleibt sichtbar.
   ============================================================ */

@media (max-width: 1300px) and (min-width: 901px) {
  :root {
    --footer-h: 96px;
    --edge: 24px;
  }

  header.header-block { padding: 14px 24px; }
  .brand-title { font-size: 18px; }
  .header-widget { font-size: 12px; gap: 10px; }

  .footer-left { padding-left: 26px; padding-right: 20px; gap: 12px; }
  .footer-number-btn { font-size: 52px; letter-spacing: -2px; }
  .footer-label { font-size: 12px; }

  .footer-cities-weather { right: 24px; gap: 14px; }
  .city-name { font-size: 9px; letter-spacing: 0.4px; }
  .city-temp { font-size: 12px; }

  .fan-tile { padding-left: 16px; margin-left: -14px; }
  .tile-num { font-size: 40px; letter-spacing: -2px; }
  .tile-label { font-size: 9px; margin-top: 2px; }
}

/* ============================================================
   MOBIL: bis 900px
   Flacher Footer, Menue schwebt als Raster darueber.
   ============================================================ */

@media (max-width: 900px) {
  :root {
    --header-h: 46px;
    --footer-h: 62px;
    --edge: 12px;
  }

  header.header-block {
    padding: 10px 18px;
    border-radius: 20px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .brand-title { font-size: 16px; }
  .header-widget { font-size: 11px; gap: 8px; }

  footer.dashboard-footer-card {
    border-radius: 24px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    overflow: visible;          /* damit das Menue herausragen darf */
  }

  .footer-left {
    padding: 0;
    width: auto;
    height: 100%;
    border-radius: 0;
    background: transparent;
    gap: 12px;
  }

  .footer-number-btn { font-size: 34px; letter-spacing: -1.5px; }
  .footer-label { font-size: 11px; letter-spacing: 0.8px; }

  .footer-cities-weather { display: none !important; }

  .fan-container {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    flex-grow: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    clip-path: none;
    z-index: 2000;

    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.22s ease,
                transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .fan-container.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .fan-tile,
  .fan-container.open .fan-tile {
    height: auto;
    min-height: 62px;
    margin: 0 !important;
    padding: 10px 12px;
    border-radius: 18px !important;
    transform: none;
    transition-delay: 0s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    justify-content: center;
  }

  .fan-container.open .fan-tile { pointer-events: auto; }

  .tile-num { font-size: 24px; letter-spacing: -1px; line-height: 1; }
  .tile-label { font-size: 8px; margin-top: 2px; letter-spacing: 0.6px; }
}
