/* =============================================================
   HanseMerkur Tierversicherung — Form Pages Stylesheet
   ============================================================= */

/* ---------------------------------------------------------------
   PAGE LAYOUT
--------------------------------------------------------------- */
.form-page {
  min-height: calc(100vh - var(--nav-h));
  background: var(--c-bg);
  padding-block: var(--sp-12) var(--sp-20);
}

.form-wrap {
  max-width: 680px;
  margin-inline: auto;
}

/* ---------------------------------------------------------------
   PAGE HEADER
--------------------------------------------------------------- */
.form-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.form-header__eyebrow {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-green);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: var(--sp-2);
}
.form-header__title {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.form-header__sub {
  font-size: var(--fs-base);
  color: var(--c-muted);
}

/* ---------------------------------------------------------------
   STEP INDICATOR
--------------------------------------------------------------- */
.step-indicator {
  margin-bottom: var(--sp-6);
}
.step-bar {
  height: 6px;
  background: var(--c-border);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: var(--sp-3);
}
.step-bar__fill {
  height: 100%;
  background: var(--c-green);
  border-radius: var(--r-full);
  width: 33.333%;
  transition: width 0.4s cubic-bezier(.4, 0, .2, 1);
}
.step-labels {
  display: flex;
  justify-content: space-between;
}
.step-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-muted);
  text-align: center;
  flex: 1;
  transition: color var(--t-base);
}
.step-label.is-active { color: var(--c-green); }
.step-label.is-done   { color: var(--c-green); opacity: .7; }

/* ---------------------------------------------------------------
   FORM CARD
--------------------------------------------------------------- */
.form-card {
  background: var(--c-white);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--sp-4);
}
@media (max-width: 600px) {
  .form-card { padding: var(--sp-6) var(--sp-5); }
}

.form-step { display: none; }
.form-step.is-active { display: block; animation: fadeSlide .25s ease; }

.form-step__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

/* ---------------------------------------------------------------
   FIELDS
--------------------------------------------------------------- */
.form-field {
  margin-bottom: var(--sp-5);
}
.form-field:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: var(--sp-2);
}
.form-label__req {
  color: var(--c-orange);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: .6875rem var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-body);
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  outline: none;
  transition:
    border-color var(--t-fast),
    box-shadow var(--t-fast),
    background var(--t-fast);
}
.form-input::placeholder { color: var(--c-muted); }
.form-input:focus {
  border-color: var(--c-green);
  background: var(--c-white);
  box-shadow: 0 0 0 3px rgba(0, 111, 81, .13);
}
.form-input.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.field-error {
  display: none;
  font-size: var(--fs-xs);
  color: #dc2626;
  margin-top: var(--sp-1);
  font-weight: 500;
}
.field-error.is-visible { display: block; }

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 480px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   PILL TOGGLE BUTTONS (single-select)
--------------------------------------------------------------- */
.pill-group-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: var(--sp-3);
}

.pill-group {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .625rem 1.375rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-muted);
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  line-height: 1;
}
.pill-btn:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-green-light);
}
.pill-btn.is-active {
  background: var(--c-green);
  border-color: var(--c-green);
  color: white;
}

/* ---------------------------------------------------------------
   CHECK CARDS (multi-select checkboxes)
--------------------------------------------------------------- */
.check-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}
.check-card:hover {
  border-color: var(--c-green);
  background: var(--c-green-pale);
}
.check-card.is-checked {
  border-color: var(--c-green);
  background: var(--c-green-light);
}

.check-card__box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.check-card.is-checked .check-card__box {
  border-color: var(--c-green);
  background: var(--c-green);
}

.check-card__checkmark {
  display: none;
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.check-card.is-checked .check-card__checkmark { display: block; }

.check-card__text strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 2px;
}
.check-card__text span {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

/* ---------------------------------------------------------------
   PRIVACY CHECKBOX
--------------------------------------------------------------- */
.privacy-wrap {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  padding: var(--sp-4) var(--sp-4);
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-fast);
}
.privacy-wrap:hover { border-color: var(--c-green); }
.privacy-wrap.is-checked { border-color: var(--c-green); }

.privacy-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.privacy-wrap.is-checked .privacy-box {
  border-color: var(--c-green);
  background: var(--c-green);
}
.privacy-checkmark {
  display: none;
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.privacy-wrap.is-checked .privacy-checkmark { display: block; }

.privacy-text {
  font-size: var(--fs-sm);
  color: var(--c-body);
  line-height: 1.5;
}
.privacy-text a {
  color: var(--c-green);
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   FORM NAVIGATION
--------------------------------------------------------------- */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border);
}
.form-nav--start { justify-content: flex-end; }

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .75rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: white;
  background: var(--c-green);
  border: 2px solid var(--c-green);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
}
.btn-next:hover {
  background: var(--c-green-dark);
  border-color: var(--c-green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .75rem 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-muted);
  background: transparent;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
}
.btn-back:hover {
  border-color: var(--c-muted);
  color: var(--c-ink);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .75rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: white;
  background: var(--c-green);
  border: 2px solid var(--c-green);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
}
.btn-submit:hover {
  background: var(--c-green-dark);
  border-color: var(--c-green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------
   FORM META
--------------------------------------------------------------- */
.form-meta {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--c-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
}
.form-meta span {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

/* ---------------------------------------------------------------
   HIDDEN UTILITY
--------------------------------------------------------------- */
.is-hidden { display: none !important; }

/* ---------------------------------------------------------------
   THANK YOU PAGE
--------------------------------------------------------------- */
.danke-hero {
  padding-block: var(--sp-16) var(--sp-12);
  text-align: center;
  background: linear-gradient(135deg, var(--c-green-light) 0%, white 100%);
  border-bottom: 1px solid var(--c-border);
}

.danke-checkmark {
  width: 80px;
  height: 80px;
  background: var(--c-green);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-6);
  box-shadow: 0 0 0 12px rgba(0, 111, 81, .12);
}

.danke-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--sp-4);
  line-height: 1.2;
}
.danke-lead {
  font-size: var(--fs-lg);
  color: var(--c-muted);
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.6;
}

.danke-steps {
  padding-block: var(--sp-16);
  background: var(--c-bg);
}
.danke-steps__heading {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--c-ink);
  text-align: center;
  margin-bottom: var(--sp-10);
}
.danke-steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 640px) {
  .danke-steps__grid { grid-template-columns: repeat(3, 1fr); }
}

.danke-step-card {
  background: white;
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
}
.danke-step-card__num {
  width: 48px;
  height: 48px;
  background: var(--c-green-light);
  color: var(--c-green);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 auto var(--sp-4);
}
.danke-step-card__title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--sp-2);
}
.danke-step-card__text {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  line-height: 1.55;
}

.danke-contact {
  padding-block: var(--sp-12) var(--sp-16);
}
.danke-contact__card {
  max-width: 520px;
  margin-inline: auto;
  background: white;
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-border);
  text-align: center;
}
.danke-contact__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-green);
  margin-bottom: var(--sp-4);
}
.danke-contact__name {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--sp-6);
}
.danke-contact__items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}
.danke-contact__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-body);
}
.danke-contact__item a {
  color: var(--c-green);
  font-weight: 600;
  text-decoration: underline;
}
.danke-contact__hours {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

.danke-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}
