/* ============================================================
 * contact.css - Contact page styles
 * Tokens from :root are defined in main.css.
 * All contact-specific components live here.
 * ============================================================ */

/* ── Contact card shell ─────────────────────────────────── */
.contact-card {
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}

.contact-card__head {
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--border);
}

.contact-card__eyebrow {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--ink-dim);
}

.contact-card__title {
  margin-top: 7px;
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.contact-card__sub {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* ── Step track ─────────────────────────────────────────── */
.step-track {
  display: flex;
  align-items: center;
  margin-top: 18px;
  pointer-events: none;
  user-select: none;
}

.step-node {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.step-node__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--ink-dim);
  flex-shrink: 0;
  transition:
    border-color 0.3s,
    background 0.3s,
    color 0.3s;
}

.step-node__dot svg {
  width: 12px;
  height: 12px;
  display: block;
}

.step-node__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.3s;
  white-space: nowrap;
}

.step-node.is-active .step-node__dot {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--card);
}

.step-node.is-active .step-node__label {
  color: var(--ink);
}

.step-node.is-done .step-node__dot {
  border-color: var(--green);
  background: var(--green);
  color: var(--card);
}

.step-node.is-done .step-node__label {
  color: var(--green);
}

.step-line {
  flex: 1;
  height: 2px;
  min-width: 14px;
  background: var(--border);
  margin: 0 8px;
  border-radius: 1px;
  transition: background 0.35s;
}

.step-line.is-done {
  background: var(--green);
}

/* ── Card body & step panels ────────────────────────────── */
.card-body {
  padding: 22px 26px;
}

.step-panel {
  display: none;
}

.step-panel.is-visible {
  display: grid;
  gap: 12px;
}

/* ── Back row ────────────────────────────────────────────── */
.step-back-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.back-btn {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition:
    background 0.15s,
    color 0.15s;
}

.back-btn:hover {
  background: var(--ink-faint);
  color: var(--ink);
}

.back-btn svg {
  width: 12px;
  height: 12px;
}

/* ── Category list (step 1) — same row layout as .method-card in step 2,
   always single column so long topic titles/descriptions have room to
   read fully instead of being squeezed into a 3-up grid of small tiles. ── */
.category-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 10px;
  background: none;
  padding: 12px 14px;
  text-align: left;
  min-height: 58px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: background 0.18s;
}

.cat-btn:hover {
  background: var(--ink-faint);
}

.cat-btn.is-selected {
  background: var(--navy-faint);
}

.cat-btn__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ink-faint);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.18s,
    color 0.18s;
  flex-shrink: 0;
}

.cat-btn__icon svg {
  width: 16px;
  height: 16px;
}

.cat-btn.is-selected .cat-btn__icon {
  background: var(--navy-faint);
  color: var(--navy);
}

.cat-btn__wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cat-btn__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cat-btn__desc {
  margin-top: 1px;
  font-size: 0.71rem;
  color: var(--ink-dim);
  line-height: 1.4;
}

.cat-btn__arrow {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--ink-dim);
  flex-shrink: 0;
  transition: opacity 0.18s;
}

.cat-btn.is-selected .cat-btn__arrow {
  opacity: 0;
}

.cat-btn.is-selected::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230f1e3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E");
}

/* ── Method list (step 2) ───────────────────────────────── */
.method-list {
  display: grid;
  gap: 8px;
}

.method-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 10px;
  background: none;
  padding: 12px 14px;
  text-align: left;
  min-height: 58px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s;
}

.method-card:hover {
  background: var(--ink-faint);
}

.method-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ink-faint);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.18s,
    color 0.18s;
}

.method-card__icon svg {
  width: 16px;
  height: 16px;
}

.method-card__wrapper {
  display: flex;
  flex-direction: column;
}

.method-card__title {
  font-size: 0.8rem;
  font-weight: 700;
}

.method-card__desc {
  margin-top: 1px;
  font-size: 0.71rem;
  color: var(--ink-dim);
}

.method-card__arrow {
  margin-left: auto;
  color: var(--ink-dim);
  flex-shrink: 0;
}

.method-card__arrow svg {
  width: 13px;
  height: 13px;
}

.method-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(240, 180, 41, 0.13);
  color: #9a7010;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Contact form (step 3a) ─────────────────────────────── */
.contact-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.col-2 {
  grid-column: span 2;
}
.col-3 {
  grid-column: span 3;
}
.col-6 {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.field input,
.field textarea,
.field select {
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--ink);
  font-size: 0.86rem;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  border-color: var(--navy);
  background: var(--card);
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(21, 21, 21, 0.28);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--navy);
  background: var(--card);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

/* Topic-specific fields (Tickets/Shop/Akkreditierung) - hidden by default,
   shown by contact.js based on the selected topic (and, for subfields, the
   selected value of that topic's "Worum geht es?" select). */
.field.topic-field {
  display: none;
}

.field.topic-field.is-visible {
  display: flex;
}

.privacy-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 4px 0;
}

.privacy-row input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin-top: 2px;
  padding: 0;
  border: none;
  flex-shrink: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

.privacy-row label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  line-height: 1.55;
  cursor: pointer;
}

.privacy-row a {
  color: var(--ink);
  text-decoration: underline;
  font-weight: 600;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-submit {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--text-white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  font-family: inherit;
  flex-shrink: 0;
  transition:
    background 0.15s,
    transform 0.12s;
}

.contact-submit:hover {
  background: var(--navy-mid);
}

.contact-submit:active {
  transform: scale(0.985);
}

.contact-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-note {
  font-size: 0.7rem;
  color: var(--ink-dim);
  line-height: 1.6;
}

.form-note--error {
  color: #c0392b;
}

/* ── Redirect panel (step 3b) ───────────────────────────── */
.redirect-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 44px 24px;
}

.redirect-box__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(15, 30, 60, 0.08);
  color: var(--navy);
}

.redirect-box__icon svg {
  width: 24px;
  height: 24px;
}

.redirect-box__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.redirect-box__desc {
  font-size: 0.8rem;
  color: var(--ink-dim);
  line-height: 1.65;
  max-width: 36ch;
}

.redirect-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--navy);
  color: var(--card);
  text-decoration: none;
  transition: background 0.15s;
  margin-top: 4px;
}

.redirect-cta:hover {
  background: var(--navy-mid);
}

.redirect-cta svg {
  width: 15px;
  height: 15px;
}

.redirect-back {
  font-size: 0.7rem;
  color: var(--ink-dim);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: none;
  font-family: inherit;
  transition:
    background 0.15s,
    color 0.15s;
}

.redirect-back:hover {
  background: var(--ink-faint);
  color: var(--ink);
}

/* WhatsApp-green CTA variant - toggled by JS when URL is a wa.me link */
.redirect-cta--wa {
  background: #25d366;
}

.redirect-cta--wa:hover {
  background: #1fbc5a;
}

/* ── Success box (step 3c) ──────────────────────────────── */
.success-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 44px 24px;
}

.success-box__icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--green-faint);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-box__icon svg {
  width: 22px;
  height: 22px;
}

.success-box__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.success-box__desc {
  font-size: 0.8rem;
  color: var(--ink-dim);
  line-height: 1.65;
  max-width: 36ch;
}

/* ── Invalid deep-link error (step "invalid") ───────────────── */
.error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 44px 24px;
}

.error-box__icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: rgba(192, 57, 43, 0.12);
  color: #c0392b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-box__icon svg {
  width: 22px;
  height: 22px;
}

.error-box__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.error-box__desc {
  font-size: 0.8rem;
  color: var(--ink-dim);
  line-height: 1.65;
  max-width: 36ch;
}

/* ── Altcha widget theming ──────────────────────────────────
   The widget's own stylesheet applies `all: revert-layer` defensively to
   everything inside it, which strips plain property overrides unless
   !important — and a plugin update reshuffled its internal markup (extra
   wrapper divs, no more .altcha-label class, box styling moved from
   .altcha onto .altcha-main), which is what broke the old overrides here:
   they styled the wrong element (outer .altcha instead of .altcha-main,
   producing a box-in-a-box) and double-dimmed the footer text (color +
   opacity stacked) into near invisibility.
   CSS custom properties are exempt from `all`, and the widget themes
   itself entirely through a documented set of --altcha-* variables — so
   setting those here is the robust, update-proof way to theme it. ── */

altcha-widget {
  display: block;
  margin-bottom: 14px;
}

.altcha {
  --altcha-color-base: var(--bg);
  --altcha-color-base-content: var(--ink);
  --altcha-border-color: var(--border);
  --altcha-border-width: 1px;
  --altcha-border-radius: 10px;
  --altcha-padding: 10px 12px;
  --altcha-color-primary: var(--navy);
  --altcha-color-primary-content: var(--text-white);
  --altcha-color-neutral: var(--border);
  --altcha-color-neutral-content: var(--ink-soft);
  --altcha-checkbox-border-color: var(--border);
  --altcha-checkbox-border-radius: 5px;
  --altcha-checkbox-size: 18px;
  --altcha-spinner-color: var(--navy);
  --altcha-input-border-radius: 8px;
  font-family: "Plus Jakarta Sans", sans-serif !important;
}

.altcha-checkbox-wrap label {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: var(--ink-soft) !important;
  cursor: pointer;
}

.altcha-footer {
  font-size: 0.68rem !important;
  color: var(--ink-dim) !important;
  opacity: 1 !important;
}

.altcha-footer a {
  color: inherit !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.altcha-logo {
  color: var(--ink-dim) !important;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .contact-card__head {
    padding: 18px 16px 16px;
  }

  .card-body {
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .col-2,
  .col-3,
  .col-6 {
    grid-column: 1 / -1;
  }
}
