/* /assets/tiwi-form/tiwi-form.css */

:root {
  --accent: #ea6084;
  --accent-soft: #f28fa9;
  --text-main: #222222;
  --text-muted: #81818b;
  --border-soft: #e5e5ec;
  --bg-card: #ffffff;
}

/* Grundlayout – das Modal / Theme begrenzt die Breite */

.tiwi-form-inner {
  width: 100%;
  background: var(--bg-card);
  border-radius: 16px;
  /*border: 1px solid var(--border-soft);*/
  padding: 24px 20px 18px;
  box-sizing: border-box;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

/* Step-Struktur */

.tiwi-step {
  width: 100%;
}
/*
.tiwi-form-question {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1rem;
}*/

.tiwi-form-content {
  width: 100%;
}

/* Layout-Wechsel: Grid/List */

.tiwi-form[data-layout="grid"] .tiwi-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3em;
}

@media (max-width: 768px) {
  .tiwi-form[data-layout="grid"] .tiwi-options {
    grid-template-columns: 1fr;
  }
}

.tiwi-form[data-layout="list"] .tiwi-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Optionen */
/* ================================
   OPTIONEN – EINHEITLICH & FUNNEL-LIKE
   ================================ */

.tiwi-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 18px 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #e4e4e4;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  font: inherit;
  outline: none;
  overflow: hidden;

  /* Funnel-typisch: mehr Tiefe */
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(0) scale(1);
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.12s ease-out,
    border-color 0.12s ease-out;
}

/* GRID → große Karten, zentriert */

.tiwi-form[data-layout="grid"] .tiwi-option {
  min-height: 120px;
  padding: 20px 22px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
}

@media (max-width: 768px) {
  .tiwi-form[data-layout="grid"] .tiwi-option {
    min-height: 100px;
  }
}

/* LIST → flacher, horizontal */

.tiwi-form[data-layout="list"] .tiwi-option {
  min-height: 60px;
}

/* ICON */

.tiwi-option-icon {
  flex: 0 0 auto;
  font-size: 1.9rem;
  line-height: 1;
}

.tiwi-form[data-layout="list"] .tiwi-option-icon {
  font-size: 1.5rem;
}

/* TEXT */

.tiwi-option-text {
  flex: 1 1 auto;
  font-size: 1rem;
  font-weight: 500;
}

/* HOVER */

@media (hover: hover) {
  .tiwi-option:hover {
    transform: translateY(-2px);
    background: var(--accent);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
  }
}

/* SELECTED */

.tiwi-option.is-selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #ffffff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(234, 96, 132, 0.45);
}

.tiwi-option.is-selected .tiwi-option-text {
  color: #ffffff;
}

/* ✓ CHECKMARK */

.tiwi-option.is-selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

/* PULSE-EFFEKT (Klick-Feedback) */

.tiwi-option__pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.25),
    transparent 55%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.tiwi-option--pulsing .tiwi-option__pulse {
  opacity: 1;
}

/* ENTRANCE ANIMATION */

@keyframes tiwi-fade-up {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tiwi-option--enter {
  animation: tiwi-fade-up 220ms ease-out forwards;
  opacity: 0;
  animation-delay: var(--tiwi-delay, 0ms);
}


/* Navigation */

.tiwi-form-nav {
  display: flex;
  justify-content: flex-end;
  gap: 2em;
  margin-top: 3em;
}

.tiwi-nav-btn {
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 1em;
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.12s ease-out,
    border-color 0.12s ease-out,
    opacity 0.12s ease-out;
}

/* Zurück: kleiner, weniger dominant */

.tiwi-nav-btn--secondary {
  min-width: auto;
  padding-inline: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.tiwi-nav-btn--secondary:hover {
  color: var(--text-main);
  background: transparent;
  box-shadow: none;
  transform: translateY(0);
}

/* Weiter: prominent, breiter */

.tiwi-nav-btn--primary {
  flex: 1;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #ffffff;
  border-radius: 6px;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(234, 96, 132, 0.4);
}


.tiwi-nav-btn--primary:hover {
  box-shadow: 0 10px 26px rgba(234, 96, 132, 0.5);
  transform: translateY(-1px);
}

.tiwi-nav-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(234, 96, 132, 0.5);
}

.tiwi-nav-btn--disabled,
.tiwi-nav-btn[disabled] {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Kontakt-Step */

.tiwi-contact-kicker,
.tiwi-form-kicker {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}


.tiwi-contact-heading,
.tiwi-form-question {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.tiwi-contact-underline,
.tiwi-form-question-underline {
  width: 60px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent-soft);
  margin: 1.5em auto 1.5em auto;
}

.tiwi-field {
  display: block;
  margin-bottom: 12px;
}

.tiwi-field-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: var(--text-muted);
  text-align: left;
}

.tiwi-field-input {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 10px 14px!important;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition:
    border-color 0.12s ease-out,
    box-shadow 0.12s ease-out,
    background 0.12s ease-out;
}


.tiwi-field-input:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-soft);
  background: #fff9fb;
}

/* Checkbox */

.tiwi-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tiwi-checkbox-input {
  margin-top: 2px;
}

.tiwi-checkbox-label a {
  color: var(--accent);
  text-decoration: none;
}

.tiwi-checkbox-label a:hover {
  text-decoration: underline;
}

/* Brevo-Info */

.tiwi-contact-info {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tiwi-contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.tiwi-contact-info a:hover {
  text-decoration: underline;
}

/* Error */

.tiwi-contact-error {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #b91c1c;
}

/* Danke-Ansicht */

.tiwi-thanks {
  width: 100%;
  background: var(--bg-card);
  /*border-radius: 16px;
  border: 1px solid var(--border-soft);*/
  padding: 26px 22px 22px;
  box-sizing: border-box;
  text-align: left;
}

.tiwi-thanks-heading {
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.tiwi-thanks-body {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4em;
}
/* Optionen */

.tiwi-textfield {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
}

.tiwi-textfield-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.tiwi-textfield-input {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 9px 11px;
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
  background: #ffffff;
  color: var(--text-main);
  line-height: 1.4;
  transition:
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out;
}

.tiwi-textfield-input::placeholder {
  color: #9ca3af;
  font-size: 0.88rem;
}

.tiwi-textfield-input:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-soft);
  outline: none;
  background: #fff9fb;
}
.tiwi-progress {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.8em;
}

.tiwi-notes {
  margin-top: 10px;
}

.tiwi-notes-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tiwi-notes-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  min-height: 100px;
  resize: vertical;
  box-sizing: border-box;
}

.tiwi-notes-input::placeholder {
  color: #9ca3af;
}
.tiwi-form-container{
    max-width:900px;
    width:100%;
    display:block;
    margin:auto;
}
.tiwi-hint {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.85;
}
.tiwi-submit-hint{
  margin: 2em 1em;
}