/* ════════════════════════════════════════════
   style-choose-school.css – MyStudy Schulauswahl
   Standalone-Seite, keine style-main.css nötig
   ════════════════════════════════════════════ */

/* ─── RESET & VARIABLEN ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --g1: #aae568;
  --g2: #75d02b;
  --g3: #4ca911;
  --g4: #2d7a00;
  --ink: #0c1209;
  --muted: #50673d;
  --bg: #f6fcf0;
  --white: #ffffff;
  --border: rgba(76, 169, 17, 0.15);
  --radius-card: 28px;
  --radius-btn: 100px;
  --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.09);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ─── HINTERGRUND ─── */
.cs-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.cs-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.cs-blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(var(--g1), transparent);
  top: -20%; right: -10%;
  opacity: 0.22;
}
.cs-blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(var(--g2), transparent);
  bottom: -10%; left: -8%;
  opacity: 0.15;
}
.cs-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(76, 169, 17, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ─── HEADER ─── */
.cs-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 48px);
}
.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.cs-back-link:hover {
  color: var(--g3);
  border-color: var(--g2);
  background: rgba(255,255,255,0.9);
}
.cs-back-link svg { width: 14px; height: 14px; }

.cs-logo {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cs-logo img {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}
.cs-logo span {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.4px;
}
.cs-logo span em {
  color: var(--g3);
  font-style: normal;
}

.cs-header-spacer {
  /* Spiegelt die Breite des Zurück-Links für symmetrische Logo-Zentrierung */
  width: 100px;
}

/* ─── MAIN ─── */
.cs-main {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: clamp(24px, 5vw, 60px) clamp(16px, 5vw, 32px) clamp(40px, 6vw, 72px);
}

/* ─── CARD ─── */
.cs-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 52px) clamp(24px, 5vw, 48px);
  width: 100%;
  max-width: 480px;
  animation: cardIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CARD TOP ─── */
.cs-card-top {
  text-align: center;
  margin-bottom: 32px;
}
.cs-logo-img {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(76, 169, 17, 0.22);
}
.cs-logo-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cs-title {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}
.cs-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}

/* ─── FELD ─── */
.cs-field {
  position: relative;
  margin-bottom: 20px;
}
.cs-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

/* Eingabezeile */
.cs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cs-search-icon {
  position: absolute;
  left: 14px;
  width: 16px; height: 16px;
  stroke: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}
.cs-input {
  width: 100%;
  padding: 13px 40px 13px 42px;
  border: 1.5px solid #ddf0c0;
  border-radius: 14px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-input:focus {
  border-color: var(--g2);
  box-shadow: 0 0 0 3px rgba(117, 208, 43, 0.15);
  background: #fff;
}
.cs-input.has-selection {
  border-color: var(--g3);
  background: #fff;
}

/* Löschen-Button im Inputfeld */
.cs-clear-input {
  position: absolute;
  right: 12px;
  width: 24px; height: 24px;
  border: none;
  background: rgba(0,0,0,0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.cs-clear-input:hover { background: rgba(0,0,0,0.13); }
.cs-clear-input svg { width: 11px; height: 11px; stroke: var(--muted); }
.cs-clear-input[hidden] { display: none; }

/* ─── DROPDOWN ─── */
.cs-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid #ddf0c0;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow: hidden;
  animation: dropIn 0.18s ease both;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs-dropdown[hidden] { display: none; }

.cs-dropdown-inner {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--g2) transparent;
}
.cs-dropdown-inner::-webkit-scrollbar { width: 4px; }
.cs-dropdown-inner::-webkit-scrollbar-thumb {
  background: var(--g2); border-radius: 2px;
}

/* Einzelne Schule im Dropdown */
.cs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  transition: background 0.15s;
  border: none;
  width: 100%;
  background: none;
  text-align: left;
}
.cs-option:hover,
.cs-option:focus,
.cs-option.highlighted {
  background: rgba(117, 208, 43, 0.1);
  color: var(--g3);
  outline: none;
}
.cs-option.selected {
  background: rgba(117, 208, 43, 0.12);
  color: var(--g3);
  font-weight: 600;
}
.cs-option-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--g2);
  flex-shrink: 0;
  transition: background 0.15s;
}
.cs-option.selected .cs-option-dot,
.cs-option:hover .cs-option-dot {
  background: var(--g3);
}
.cs-option-sub {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  flex-shrink: 0;
  font-weight: 400;
}
.cs-option.selected .cs-option-sub { color: var(--g3); }

/* Highlight-Markierung im Optionstext */
.cs-option mark {
  background: rgba(117, 208, 43, 0.3);
  color: var(--g4);
  border-radius: 2px;
  padding: 0 1px;
}

/* Leer-Zustand */
.cs-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  color: var(--muted);
  font-size: 13px;
}
.cs-empty[hidden] { display: none; }
.cs-empty svg { width: 18px; height: 18px; stroke: var(--muted); flex-shrink: 0; }

/* ─── AUSGEWÄHLTE SCHULE ─── */
.cs-selected-wrap {
  background: rgba(117, 208, 43, 0.07);
  border: 1.5px solid rgba(117, 208, 43, 0.25);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  animation: fadeIn 0.25s ease;
}
.cs-selected-wrap[hidden] { display: none; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs-selected-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--g3);
  margin-bottom: 8px;
}
.cs-selected-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
}
.cs-selected-check {
  width: 18px; height: 18px;
  stroke: var(--g3);
  flex-shrink: 0;
}
.cs-redirect-hint {
  font-size: 12px;
  color: var(--muted);
}
.cs-redirect-hint strong {
  color: var(--g3);
  font-family: "Syne", sans-serif;
  font-weight: 700;
}

/* ─── SUBMIT-BUTTON ─── */
.cs-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--g3);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 28px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(76, 169, 17, 0.2);
}
.cs-submit:not(:disabled):hover {
  background: var(--g4);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(76, 169, 17, 0.35);
}
.cs-submit:disabled {
  background: #cde9a8;
  color: rgba(255,255,255,0.7);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.cs-submit svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ─── HINWEIS UNTEN ─── */
.cs-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.cs-note a {
  color: var(--g3);
  font-weight: 600;
  transition: color var(--transition);
}
.cs-note a:hover { color: var(--g4); }

/* ─── RESPONSIVE ─── */
@media (max-width: 520px) {
  .cs-header-spacer { display: none; }
  .cs-logo span { display: none; }
  .cs-card { border-radius: 20px; }
  .cs-dropdown-inner { max-height: 180px; }
}
