/**
 * festivals-base.css
 * ---------------------------------------------------------------
 * Nur fuer die Festival-Uebersichtsseite (festivals.php, Kalender +
 * Liste). Getrennt von index-base.css und festival-base.css, damit
 * sich Probleme hier isoliert debuggen lassen.
 *
 * Nutzt dieselben CSS-Variablen aus index-base.css - die muss also
 * IMMER vor dieser Datei geladen werden.
 * ---------------------------------------------------------------
 */

.fk-page-header{
  display:flex; justify-content:space-between; align-items:flex-start;
  flex-wrap:wrap; gap:20px; margin:28px 0 20px;
}
.fk-page-header h1{ font-size:clamp(1.5rem,2.8vw,2rem); margin-bottom:8px; }
.fk-page-header p{ color:var(--text-muted); font-size:.95rem; max-width:56ch; }

.fk-view-switch{
  display:flex; gap:6px; background:var(--surface-2); padding:4px; border-radius:100px;
  border:1px solid var(--line); flex:none;
}
.fk-switch-btn{
  background:transparent; border:0; color:var(--text-muted);
  padding:9px 18px; font-size:.82rem; font-weight:600; font-family:'Space Grotesk',sans-serif;
  border-radius:100px; cursor:pointer; transition:.15s ease;
}
.fk-switch-btn.active{ background:var(--surface); color:var(--text); box-shadow:var(--shadow-1); }
.fk-switch-btn:hover:not(.active){ color:var(--text); }

.fk-watchlist-toggle{
  background:transparent; border:1px solid var(--line); color:var(--text-muted);
  padding:9px 16px; font-size:.82rem; font-weight:600; font-family:'Space Grotesk',sans-serif;
  border-radius:100px; cursor:pointer; transition:.15s ease; margin-left:8px;
}
.fk-watchlist-toggle:hover{ color:var(--text); border-color:var(--line-strong); }
.fk-watchlist-toggle.is-active{ background:var(--orange); border-color:var(--orange); color:#181104; }

.fk-list-actions{
  display:flex; flex-direction:column; gap:6px; align-items:center; justify-content:center;
  flex:none; margin-left:auto; padding-left:8px;
}
.fk-bookmark-btn, .fk-calexport-btn{
  background:var(--surface-2); border:1px solid var(--line); color:var(--text-muted);
  width:34px; height:34px; border-radius:50%; cursor:pointer; font-size:1rem;
  display:flex; align-items:center; justify-content:center; transition:.15s ease;
}
.fk-bookmark-btn:hover, .fk-calexport-btn:hover{ border-color:var(--orange); color:var(--orange-light); }

.fk-calexport-overlay{
  position:fixed; inset:0; background:rgba(5,7,20,.7); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; z-index:1000; padding:20px;
}
.fk-calexport-box{
  background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--radius-m);
  padding:26px; max-width:340px; width:100%; position:relative;
}
.fk-calexport-box h3{ font-family:'Space Grotesk',sans-serif; font-size:1.05rem; margin:0 0 16px; }
.fk-calexport-close{
  position:absolute; top:14px; right:14px; background:none; border:none; color:var(--text-muted);
  font-size:1.3rem; line-height:1; cursor:pointer; padding:0;
}
.fk-calexport-close:hover{ color:var(--text); }
.fk-calexport-option{
  display:flex; align-items:center; gap:12px; width:100%; text-align:left;
  background:var(--surface-2); border:1px solid var(--line); border-radius:10px;
  padding:12px 14px; margin-bottom:10px; cursor:pointer; color:var(--text); font-family:inherit;
}
.fk-calexport-option:last-child{ margin-bottom:0; }
.fk-calexport-option:hover{ border-color:var(--orange); }
.fk-calexport-icon{ font-size:1.4rem; flex:none; }
.fk-calexport-option small{ color:var(--text-muted); font-weight:400; }
.fk-bookmark-btn.is-active{ color:var(--orange); border-color:var(--orange); }
.fk-watchlist-empty{ text-align:center; color:var(--text-muted); padding:60px 20px; font-size:.9rem; }

.fk-controls{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m);
  padding:14px 18px; display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:20px;
}
.fk-search{
  flex:1 1 220px; min-width:180px;
  background:var(--surface-2); border:1px solid var(--line-strong); color:var(--text);
  padding:9px 14px; border-radius:var(--radius-s); font-size:.85rem; font-family:inherit;
}
.fk-search::placeholder{ color:var(--text-faint); }
.fk-search:focus{ outline:none; border-color:var(--orange); }
.fk-filter-group{ display:flex; gap:10px; flex-wrap:wrap; }
.fk-select{
  background:var(--surface-2); border:1px solid var(--line-strong); color:var(--text);
  padding:9px 14px; border-radius:var(--radius-s); font-size:.85rem; font-family:inherit;
  cursor:pointer;
}
.fk-select:focus{ outline:none; border-color:var(--orange); }

/* KALENDER */
.fk-calendar-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m);
  padding:24px; box-shadow:var(--shadow-1); margin-bottom:32px;
}
.fk-month-header{ display:flex; align-items:center; justify-content:center; gap:20px; margin-bottom:20px; }
.fk-month-header h2{ font-size:1.25rem; min-width:180px; text-align:center; }
.fk-nav-arrow{
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line-strong);
  background:var(--surface-2); color:var(--text); display:flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:.8rem; transition:.15s ease;
}
.fk-nav-arrow:hover{ background:var(--orange); border-color:var(--orange); color:#181104; }

.fk-weekdays{
  display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:8px;
  text-align:center; font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-faint);
}
.fk-days-grid{ display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:6px; }
.fk-day-cell{
  background:var(--surface-2); border-radius:var(--radius-s); height:96px; overflow:hidden;
  padding:8px; display:flex; flex-direction:column; gap:5px; min-width:0;
}
.fk-day-cell.is-other-month{ opacity:.3; }
.fk-day-cell.is-today{ border:1px solid var(--orange); }
.fk-day-num{ font-size:.78rem; font-weight:700; color:var(--text-faint); flex:none; }
.fk-more-pill{
  background:transparent; border:1px dashed var(--line-strong); border-radius:6px;
  padding:4px 7px; font-size:.68rem; color:var(--text-faint); text-align:center;
  flex:none; cursor:pointer; position:relative; font-family:inherit;
  width:100%; min-width:0; box-sizing:border-box; overflow:hidden;
  white-space:nowrap; text-overflow:ellipsis;
}
.fk-more-pill:hover{ border-color:var(--orange); color:var(--orange-light); }
.fk-day-cell.is-today .fk-day-num{ color:var(--orange-light); }

.fk-day-filter-banner{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:rgba(255,122,26,.1); border:1px solid rgba(255,122,26,.35); border-radius:10px;
  padding:11px 16px; margin-bottom:16px; font-size:.85rem; color:var(--text);
}
.fk-day-filter-clear{
  background:none; border:1px solid var(--line-strong); border-radius:6px; color:var(--text-muted);
  padding:5px 10px; font-size:.78rem; cursor:pointer; flex:none; white-space:nowrap;
}
.fk-day-filter-clear:hover{ border-color:var(--orange); color:var(--orange-light); }

.fk-calendar-capped-banner{
  background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.35); border-radius:10px;
  padding:11px 16px; margin-bottom:16px; font-size:.82rem; color:#fca5a5; line-height:1.5;
}

.fk-event-pill{
  position:relative; flex:none;
  background:var(--surface); border-left:3px solid var(--orange); border-radius:6px;
  padding:5px 7px; font-size:.72rem; cursor:pointer; transition:.15s ease; text-decoration:none;
  display:block; overflow:hidden;
  width:100%; min-width:0; box-sizing:border-box; /* erzwingt Breite = Zellenbreite, egal wie lang der Titel ist */
}
.fk-event-pill:hover{ transform:translateY(-1px); border-left-color:#fff; }
.fk-event-pill.genre-blue{ border-left-color:var(--blue); }
.fk-event-pill.genre-cyan{ border-left-color:var(--cyan); }
.fk-event-pill b{ display:block; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; min-width:0; }

/* Tooltip: wird per JS an <body> angehaengt (siehe festivals.js), damit er
   nicht vom overflow:hidden der Tageszelle abgeschnitten wird. */
.fk-tooltip{
  position:fixed; z-index:200; pointer-events:none;
  background:#0A0E27; border:1px solid var(--line-strong); border-radius:8px;
  padding:8px 12px; font-size:.72rem; line-height:1.5; color:var(--text);
  white-space:pre-line; width:max-content; max-width:220px;
  box-shadow:var(--shadow-2);
  opacity:0; transform:translateY(4px); transition:opacity .12s ease, transform .12s ease;
}
.fk-tooltip.is-visible{ opacity:1; transform:translateY(0); }

@media (max-width:760px){
  .fk-weekdays, .fk-days-grid{ grid-template-columns:repeat(7, minmax(34px,1fr)); }
  .fk-day-cell{ min-height:60px; padding:4px; }
}

/* LISTE */
.fk-list-view{ display:flex; flex-direction:column; gap:12px; margin-bottom:32px; }
.fk-list-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m);
  padding:16px 20px; display:flex; align-items:center; gap:18px; text-decoration:none; color:inherit;
  transition:.15s ease;
}
.fk-list-card:hover{ border-color:var(--orange); transform:translateY(-2px); box-shadow:var(--shadow-1); }
.fk-list-thumb{
  width:64px; height:64px; border-radius:var(--radius-s); flex:none; background-size:cover; background-position:center;
  background-color:var(--surface-2);
}
.fk-list-date{
  background:rgba(255,122,26,.12); color:var(--orange-light); border:1px solid rgba(255,122,26,.3);
  padding:8px 12px; border-radius:var(--radius-s); font-weight:700; font-size:.78rem; text-align:center; min-width:96px; flex:none;
}
.fk-list-info h4{ font-size:1rem; margin-bottom:4px; }
.fk-list-info p{ font-size:.82rem; color:var(--text-muted); }

.fk-empty{ text-align:center; color:var(--text-muted); padding:40px 0; }

/* PAGINATION */
.fk-pagination{
  display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap;
  margin:8px 0 32px;
}
.fk-page-btn{
  min-width:36px; height:36px; padding:0 10px; border-radius:var(--radius-s);
  background:var(--surface); border:1px solid var(--line-strong); color:var(--text-muted);
  font-size:.85rem; font-family:'Space Grotesk',sans-serif; font-weight:600; cursor:pointer;
  transition:.15s ease;
}
.fk-page-btn:hover:not([disabled]){ border-color:var(--orange); color:var(--text); }
.fk-page-btn.active{ background:var(--orange); border-color:var(--orange); color:#181104; }
.fk-page-btn[disabled]{ opacity:.35; cursor:not-allowed; }
.fk-page-ellipsis{ color:var(--text-faint); padding:0 4px; }
.fk-page-count{ margin-left:12px; font-size:.78rem; color:var(--text-faint); }
@media (max-width:600px){ .fk-page-count{ width:100%; text-align:center; margin:8px 0 0; } }

/* "Rahmen"-Promo-Tier: in der Liste funktioniert ein pulsierender Rahmen
   gut (Keyframe siehe index-base.css) - im Kalender sind die Pills dafuer
   zu klein, deshalb dort stattdessen oranger Hintergrund + blauer
   Akzentstrich statt eines Rahmens. */
.fk-event-pill.is-rahmen-promoted{
  background:var(--orange);
  border-left-color:var(--blue);
}
.fk-event-pill.is-rahmen-promoted b{ color:#181104; }
.fk-event-pill.is-rahmen-promoted:hover{ border-left-color:var(--blue-light, var(--blue)); }

.fk-list-card.is-rahmen-promoted{
  border:2px solid var(--orange);
  animation:rahmenPulse 2s ease-in-out infinite;
}
