/* =========================================================
   BirdPI – Welcome Modal
   Nutzt globale Variablen aus birdpi.css
   ========================================================= */

.welcome-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.welcome-modal-content {
  background: var(--card);
  color: var(--fg);
  padding: 0 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  max-width: 600px;
  width: 92vw;
  text-align: center;
  border: 1px solid var(--grid);
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .5rem;
  margin-bottom: 1rem;
}

.welcome-kpi {
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--grid);
}

.welcome-kpi .label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.welcome-kpi .value {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--fg);
}

.welcome-modal-content footer {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0 1rem;
}

.btn-primary, .btn-secondary {
  padding: 0.5rem 1rem;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary:hover { border-color: var(--accent); }

.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-button {
  background: var(--bg);
  color: var(--fg);
  padding: 0;
  font-size: 1.4rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
}

.dropdown-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 10px;
  vertical-align: middle;
  border-top: 8px solid;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  transition: transform 0.2s ease;
}

.dropdown-container:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  background: var(--card);
  box-shadow: 0 8px 16px rgba(0,0,0,.25);
  z-index: 1;
  border-radius: var(--radius);
  bottom: 100%;
  padding-bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  font-size: .85rem;
  border: 1px solid var(--grid);
}

.dropdown-content a {
  color: var(--fg);
  padding: 10px 14px;
  text-decoration: none;
  display: block;
  border-radius: 6px;
}
.dropdown-content a:hover {
  background: rgba(255,255,255,.06);
}

.dropdown-container:hover .dropdown-content {
  display: block;
}

.add-new-site {
  font-style: italic;
  color: var(--accent) !important;
}

.qr-code-image {
  display: block;
  margin: 0 auto;
  max-width: 80%;
}

/* Tab-Navigation */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid var(--grid);
  margin-bottom: 1.5rem;
}

.tab-link {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted);
  transition: color .15s ease, border-color .15s ease;
  border-bottom: 3px solid transparent;
}
.tab-link:hover { color: var(--fg); }
.tab-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active {
  display: block;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

#welcome-tab { height: 100%; overflow: visible; max-height: none; }
#qr-tab.tab-content.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.welcome-settings {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* =========================================================
   Saisonkalender Cards
   ========================================================= */

.season-feed {
  text-align: left;
  padding-bottom: .5rem;
}

.season-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--grid);
  border-left: 3px solid var(--accent, #f0a030);
}

.season-card-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--card);
  padding: 6px;
}

.season-card-placeholder {
  background: linear-gradient(135deg, var(--card), var(--bg));
}

.season-card-body {
  flex: 1;
  min-width: 0;
}

.season-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.season-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.season-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.season-card-range {
  white-space: nowrap;
}

.season-card-species {
  font-style: italic;
}

/* Badges */
.season-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.season-badge-zugvogel  { background: #1a3a5c; color: #60a5fa; }
.season-badge-paarung   { background: #3a1a3a; color: #f472b6; }
.season-badge-brutzeit  { background: #1a3a2a; color: #34d399; }
.season-badge-aktion    { background: #3a2a1a; color: #fbbf24; }
.season-badge-beobachtung { background: #2a2a1a; color: #a78bfa; }
.season-badge-info      { background: #1a2a2a; color: #67e8f9; }

.season-loading, .season-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* =========================================================
   FAQ
   ========================================================= */

.faq-list {
  text-align: left;
  padding-bottom: .5rem;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--grid);
  border-radius: 8px;
  margin-bottom: 6px;
}

.faq-item summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item summary::before {
  content: "▸";
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::before {
  transform: rotate(90deg);
}

.faq-item p, .faq-item ul {
  padding: 0 14px 10px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.faq-item ul {
  padding-left: 28px;
}

.faq-item li {
  margin-bottom: 4px;
}

/* =========================================================
   Info-Tab
   ========================================================= */

.info-section {
  text-align: left;
  padding-bottom: .5rem;
}

.info-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  margin: 1rem 0 .5rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--grid);
}

.info-heading:first-child {
  margin-top: 0;
}

.info-diagram {
  padding: 0 14px 10px;
}

.info-flow {
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--accent);
  overflow-x: auto;
  margin: 0 0 6px;
}

.info-diagram p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* =========================================================
   Mobile (≤600px)
   ========================================================= */
@media (max-width: 600px) {
  .welcome-modal-content {
    padding: 0 .75rem;
    width: 96vw;
  }

  /* Tabs: kompakter */
  .tab-link {
    padding: .6rem .7rem;
    font-size: .8rem;
  }

  /* KPI-Grid: 2 Spalten statt auto-fit */
  .welcome-grid {
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
  }

  .welcome-kpi {
    padding: .6rem;
  }

  .welcome-kpi .label {
    font-size: .75rem;
    margin-bottom: .3rem;
  }

  .welcome-kpi .value {
    font-size: 1rem;
  }

  /* Dropdown-Button (Standort) kleiner */
  .dropdown-button {
    font-size: 1rem;
  }

  /* Footer: vertikal stapeln */
  .welcome-modal-content footer {
    flex-direction: column;
    gap: .4rem;
    padding: .4rem 0 .75rem;
  }

  /* Season-Cards: kompakter */
  .season-card-img {
    width: 42px;
    height: 42px;
  }

  .season-card-title {
    font-size: .82rem;
  }

  .season-card-desc {
    font-size: .72rem;
  }

  /* QR: kleiner */
  #qr-tab img {
    max-width: 160px;
  }

  #qr-tab p {
    font-size: .85rem;
  }
}