/* =========================
   CARDS / PANELS (Base)
   ========================= */
.impressum-card,
.slide-panel{
  max-width: 760px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

/* =========================
   IMPRESSUM CARD
   ========================= */
.impressum-card{
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow2);
  position: relative;
  overflow: hidden;
}
.impressum-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(420px 240px at 20% 0%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(360px 220px at 80% 0%, rgba(61,214,208,.10), transparent 62%);
  pointer-events:none;
}

.impressum-header{
  display:flex;
  gap:1rem;
  align-items:center;
}
.impressum-logo{
  width:90px;
  height:auto;
  border-radius:12px;
}
.muted{ opacity:.75; }

/* =========================
   ACTION BUTTONS
   ========================= */
.impressum-actions{
  max-width:760px;
  margin-top:1rem;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:.75rem;
}
@media (max-width:640px){
  .impressum-actions{ grid-template-columns:1fr; }
}

.action-btn{
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:.9rem 1.1rem;
  border-radius:14px;

  background: linear-gradient(135deg,
    rgba(124,92,255,.15),
    rgba(61,214,208,.10)
  );
  border:1px solid rgba(255,255,255,.15);
  color:inherit;

  font-size:1rem;
  font-weight:600;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.action-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.action-btn:active{ transform: translateY(0); }
.action-btn:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(124,92,255,.35), 0 10px 30px rgba(0,0,0,.35);
}

/* Chevron */
.action-btn .chevron{
  width:10px;
  height:10px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform: rotate(45deg);
  opacity:.7;
  transition: transform .25s ease, opacity .25s ease;
}

/* Open state */
.action-btn[aria-expanded="true"]{
  background: linear-gradient(135deg,
    rgba(124,92,255,.35),
    rgba(61,214,208,.25)
  );
  border-color: rgba(124,92,255,.6);
}
.action-btn[aria-expanded="true"] .chevron{
  transform: rotate(-135deg);
  opacity:1;
}

/* Datenschutz */
.datenschutz-button{
  background: linear-gradient(135deg,
    rgba(255,180,0,.18),
    rgba(255,120,0,.10)
  );
  border-color: rgba(255,180,0,.35);
}
.datenschutz-button[aria-expanded="true"]{
  background: linear-gradient(135deg,
    rgba(255,180,0,.28),
    rgba(255,120,0,.18)
  );
  border-color: rgba(255,180,0,.55);
}

/* =========================
   SLIDE PANEL (Accordion Content)
   Wichtig: Panel ist "zu" wirklich unsichtbar + nicht klickbar
   ========================= */
.slide-panel{
  margin-top:0;
  padding:0;

  max-height:0;
  opacity:0;
  overflow:hidden;
  visibility:hidden;
  pointer-events:none;

  transform: translateY(-6px);
  transition:
    max-height .45s ease,
    opacity .25s ease,
    transform .25s ease,
    visibility 0s linear .25s;
}

.slide-panel.is-open{
  margin-top:1rem;
  padding: 18px 16px 16px;
  padding-top: 0;

  max-height:5000px;
  opacity:1;
  visibility:visible;
  pointer-events:auto;

  transform: translateY(0);
  transition:
    max-height .45s ease,
    opacity .25s ease,
    transform .25s ease,
    visibility 0s;
}

.slide-panel h2{
  text-align:center;
}

/* =========================
   KONTAKT PANEL STYLE
   WICHTIG: Nur im offenen Zustand, damit kein Overlay blockiert!
   ========================= */
.slide-panel.kontakt.is-open{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
}
.slide-panel.kontakt.is-open::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(420px 240px at 20% 0%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(360px 220px at 80% 0%, rgba(61,214,208,.10), transparent 62%);
  pointer-events:none;
}

/* =========================
   FORM ELEMENTS
   ========================= */
form label{
  display:block;
  margin:.75rem 0 .35rem;
}

form input,
form textarea{
  width:100%;
  margin-top:4px;
  padding:.75rem;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:inherit;
  outline:0;
}
form textarea{ resize:vertical; }

form input:focus,
form input:focus-visible,
form textarea:focus,
form textarea:focus-visible{
  border-color: transparent;
  box-shadow:
    0 0 0 2px rgba(124,92,255,.75),
    0 0 0 7px rgba(124,92,255,.18);
}

.row{
  display:flex;
  gap:.5rem;
}
.row input:first-child{ flex:1; }

/* link-like */
.linklike{
  background:none;
  border:0;
  padding:0;
  color:inherit;
  text-decoration:underline;
  cursor:pointer;
}

/* =========================
   ANREDE (Radio Pills)
   ========================= */
.anrede-group{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}
.anrede-group input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.anrede-group label{
  padding:.5rem .9rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  cursor:pointer;

  font-weight:500;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.anrede-group label:hover{
  border-color: rgba(124,92,255,.6);
}
.anrede-group input[type="radio"]:checked + label{
  border-color: rgba(124,92,255,.8);
  background: rgba(124,92,255,.25);
  box-shadow: 0 0 0 3px rgba(124,92,255,.25);
}
.anrede-group input[type="radio"]:focus-visible + label{
  outline:none;
  box-shadow: 0 0 0 3px rgba(124,92,255,.45);
}

/* =========================
   CONSENT CHECKBOX
   ========================= */
.checkbox-consent{
  display:flex;
  align-items:center;
  gap:.6rem;
  cursor:pointer;
  user-select:none;
  margin-top:.75rem;
}
.checkbox-consent input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.checkbox-consent .checkmark{
  width:20px;
  height:20px;
  flex-shrink:0;

  border-radius:6px;
  border:1.5px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.25);

  display:grid;
  place-items:center;

  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.checkbox-consent .checkmark::after{
  content:"";
  width:6px;
  height:10px;
  border-right:2px solid #fff;
  border-bottom:2px solid #fff;
  transform: rotate(45deg) scale(0);
  transition: transform .15s ease;
}
.checkbox-consent:hover .checkmark{
  border-color: rgba(124,92,255,.6);
}
.checkbox-consent input:checked + .checkmark{
  background: rgba(124,92,255,.35);
  border-color: rgba(124,92,255,.9);
}
.checkbox-consent input:checked + .checkmark::after{
  transform: rotate(45deg) scale(1);
}
.checkbox-consent input:focus-visible + .checkmark{
  box-shadow: 0 0 0 3px rgba(124,92,255,.45);
}
.checkbox-text{
  font-size:.9rem;
  line-height:1.3;
}
.checkbox-text a{
  text-decoration:underline;
  cursor:pointer;
}

/* =========================
   FORM FEEDBACK
   ========================= */
.form-alert{
  margin:12px 0 16px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.14);
  border-left-width:4px;
  border-radius:14px;
  background: linear-gradient(180deg, rgba(255,90,90,.18), rgba(255,90,90,.06));
}
.field-error{
  display:block;
  margin-top:6px;
  font-size:.92rem;
  opacity:.95;
  color: rgba(255,90,90,.55);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"]{
  border-color: transparent;
  box-shadow:
    0 0 0 2px rgba(255,90,90,.75),
    0 0 0 7px rgba(124,92,255,.18);
}
.form-success{
  margin:14px 0 18px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(120,255,160,.35);
  background: linear-gradient(180deg, rgba(120,255,160,.18), rgba(120,255,160,.06));
  box-shadow: 0 0 0 3px rgba(120,255,160,.15);
}

/* =========================
   PRIMARY BUTTON
   ========================= */
.primary{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  width:100%;
  height:40px;
  border-radius:16px;

  cursor:pointer;
  font-weight:850;
  letter-spacing:.2px;

  margin-top:14px;
  color:#fff;
  border:0;

  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(124,92,255,1), rgba(61,214,208,.85));

  box-shadow: 0 16px 46px rgba(0,0,0,.42);
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}
.primary:hover{ filter: brightness(1.03); }
.primary:active{ transform: translateY(1px); }

.primary svg{ width:25px; }

.primary.is-loading{
  opacity:.7;
  cursor:not-allowed;
}

.primary:disabled{
  opacity:.65;
  cursor:not-allowed;
  filter:saturate(.8);
}

/* Loader soll niemals Klicks blockieren */
.primary:disabled *{
  pointer-events:none;
}

/* =========================
   CAPTCHA
   ========================= */
.captcha{
  display:flex;
  gap:10px;
  align-items:center;
}
.captcha img{
  border-radius:10px;
  cursor:pointer;
  margin: auto;
}
/* Accordion Buttons IMMER klickbar */
.impressum-actions{
  position: relative;
  z-index: 50;
}

.action-btn{
  position: relative;
  z-index: 51;
}

/* Panels darunter */
.slide-panel{
  position: relative;
  z-index: 1;
}

/* hidden MUSS raus aus Layout + Touch */
.slide-panel[hidden]{
  display:none !important;
}
/* Buttons immer klickbar */
.impressum-actions{ position:relative; z-index:1000; }
.action-btn{ position:relative; z-index:1001; }
.slide-panel{ position:relative; z-index:1; }
input[name="captcha"]{
  text-transform: uppercase;
  letter-spacing: .15em;
}