/* ============================================================
   weather-animation.css
   Wolken & Wind – Suderburg · Animationsspezifische Styles
   ============================================================ */

:root {
  --wa-canvas-height: 620px;
  --wa-sky:    #D6E5EF;
  --wa-orange: #D97757;
  --wa-teal:   #BCD1CA;
  --wa-purple: #CBCADB;
  --wa-beige:  #F0EEE6;
  --wa-text:   #2E2F2F;
}

/* ── content-start: Höhe aufheben, Overflow verhindern ─────── */
#content-start {
  height: auto !important;
  overflow-x: hidden;        /* verhindert horizontales Überlaufen */
  box-sizing: border-box;
}

/* ── Canvas-Container ─────────────────────────────────────── */
#canvas-container {
  position: relative;
  width: 100%;
  max-width: 100%;           /* nie breiter als die td-Zelle */
  height: var(--wa-canvas-height);
  box-sizing: border-box;
  border-radius: 14px;
  overflow: hidden;
  background: #2E5F8A;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

#canvas-container:active { cursor: grabbing; }

#weather-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
}

/* ── Lade-Overlay ─────────────────────────────────────────── */
#loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(240, 238, 230, 0.90);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
}

#loading-overlay p {
  margin: 0;
  font-size: 15px;
  opacity: 0.7;
}

.loading-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 4px;
  animation: loadBounce 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { background: var(--wa-orange); animation-delay: 0s; }
.loading-dots span:nth-child(2) { background: var(--wa-teal);   animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { background: var(--wa-purple); animation-delay: 0.4s; }

@keyframes loadBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1.2); opacity: 1;   }
}

/* ── Stations-Label & Kamera-Hinweis (über Canvas) ────────── */
#station-label {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-light), sans-serif;
  font-size: 11px;
  color: var(--wa-text);
  opacity: 0.50;
  z-index: 10;
  pointer-events: none;
}

#cam-hint {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--font-light), sans-serif;
  font-size: 11px;
  color: var(--wa-text);
  opacity: 0.40;
  z-index: 10;
  pointer-events: none;
}

/* ── Timeline ─────────────────────────────────────────────── */
#timeline-container {
  margin-top: 18px;
  max-width: 100%;
  box-sizing: border-box;
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.tl-edge {
  font-family: var(--font-light), sans-serif;
  font-size: 12px;
  color: var(--wa-text);
  opacity: 0.55;
}

#current-time-label {
  font-family: var(--font-medium), sans-serif;
  font-size: 13px;
  color: var(--wa-orange);
}

#time-slider {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(
    to right,
    #F4A261 0%,
    var(--wa-orange) 48%,
    var(--wa-teal) 52%,
    #89CFF0 100%
  );
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  display: block;
}

#time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wa-text);
  border: 3px solid var(--wa-beige);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  cursor: pointer;
  transition: transform 0.12s;
}

#time-slider::-webkit-slider-thumb:active { transform: scale(1.15); }

#time-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wa-text);
  border: 3px solid var(--wa-beige);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  cursor: pointer;
}

/* ── Playback-Buttons ─────────────────────────────────────── */
#playback-controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;           /* bricht auf sehr kleinen Screens um */
}

.wa-btn {
  min-width: 120px;
  background-color: var(--wa-teal);
  border: none;
  outline: none;
  color: var(--wa-text);
  font-family: var(--font-light), sans-serif;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
  box-sizing: border-box;
}

.wa-btn:hover  { background-color: var(--wa-orange); color: var(--wa-beige); }
.wa-btn:active { transform: scale(0.95); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --wa-canvas-height: 360px;
  }

  #station-label,
  #cam-hint         { font-size: 10px; }

  .tl-edge          { font-size: 11px; }
  #current-time-label { font-size: 12px; }

  #time-slider::-webkit-slider-thumb { width: 18px; height: 18px; }
  #time-slider::-moz-range-thumb     { width: 18px; height: 18px; }

  .wa-btn {
    min-width: 100px;
    font-size: 14px;
    padding: 9px 14px;
  }
}
