/* ==========================================================
   Zaun Konfigurator – Scoped Styles (.zkfg-wrap)
   Font: Roboto (wie zaunkonzept.com)
   Brand: #063231 (dunkelgrün), #CBFF54 (akzentgelb)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

/* ---- Reset / Basis ---- */
.zkfg-wrap *,
.zkfg-wrap *::before,
.zkfg-wrap *::after {
  box-sizing: border-box;
}

.zkfg-wrap {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --zkfg-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #2d2d2d;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  line-height: 1.6;
}

.zkfg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Header ---- */
.zkfg-header {
  margin-bottom: 32px;
}

.zkfg-headline {
  font-family: var(--zkfg-font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #063231;
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: normal;
  word-spacing: normal;
}

.zkfg-intro {
  color: #555;
  font-size: 1rem;
  margin: 0;
}

/* ---- Progress ---- */
.zkfg-progress {
  margin-bottom: 32px;
}

.zkfg-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: #063231;
  margin-bottom: 8px;
}

.zkfg-progress-track {
  width: 100%;
  height: 6px;
  background: #e0e8e4;
  border-radius: 99px;
  overflow: hidden;
}

.zkfg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #063231 0%, #0c5249 100%);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(.4,0,.2,1);
}

/* ---- Step ---- */
.zkfg-step-title {
  font-family: var(--zkfg-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #063231;
  margin: 0 0 6px;
  letter-spacing: normal;
  word-spacing: normal;
}

.zkfg-step-intro {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 20px;
}

/* ---- Cards ---- */
.zkfg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.zkfg-cards--small {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.zkfg-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 2px solid #dde8e2;
  border-radius: 12px;
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: left;
}

.zkfg-card:hover,
.zkfg-card:focus {
  border-color: #063231;
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 50, 49, 0.12);
}

.zkfg-card--compact {
  padding: 14px 12px;
  text-align: center;
  align-items: center;
}

.zkfg-card.is-selected {
  border-color: #063231;
  background: #eef5f3;
  box-shadow: 0 0 0 3px rgba(6, 50, 49, 0.15);
}

.zkfg-card-icon {
  color: #0c5249;
  display: block;
  margin-bottom: 4px;
}

/* Model card image */
.zkfg-card-img {
  display: block;
  width: 100%;
  height: 100px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 8px;
}
.zkfg-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Summary image */
.zkfg-summary-img-wrap {
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 360px;
}
.zkfg-summary-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

/* Optional label */
.zkfg-optional {
  font-weight: 400;
  color: #888;
  font-size: 0.82rem;
}

.zkfg-card-name {
  font-family: var(--zkfg-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #063231;
  line-height: 1.3;
  letter-spacing: normal;
  word-spacing: normal;
}

.zkfg-card-desc {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
}

/* ---- Field group ---- */
.zkfg-field-group {
  margin-top: 24px;
}

.zkfg-field-group:first-child {
  margin-top: 0;
}

.zkfg-field-label,
.zkfg-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.zkfg-hint {
  display: block;
  font-size: 0.78rem;
  color: #888;
  margin-top: 4px;
}

.zkfg-field-error {
  display: block;
  font-size: 0.82rem;
  color: #c0392b;
  font-weight: 600;
  margin-top: 6px;
}

@keyframes zkfg-shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-7px); }
  30%       { transform: translateX(7px); }
  45%       { transform: translateX(-5px); }
  60%       { transform: translateX(5px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(3px); }
}

.zkfg-shake {
  animation: zkfg-shake 0.45s ease;
}

.zkfg-input--error {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15) !important;
}

.zkfg-required {
  color: #c0392b;
}

/* ---- Inputs ---- */
.zkfg-input {
  width: 100%;
  max-width: 340px;
  padding: 10px 14px;
  border: 2px solid #d0dbd6;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #063231;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.zkfg-input:focus {
  outline: none;
  border-color: #063231;
  box-shadow: 0 0 0 3px rgba(6, 50, 49, 0.12);
}

.zkfg-input::placeholder {
  color: #aaa;
}

.zkfg-textarea {
  max-width: 100%;
  resize: vertical;
  min-height: 100px;
}

/* ---- Colors ---- */
.zkfg-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.zkfg-color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 80px;
  text-align: center;
}

.zkfg-color-swatch:hover,
.zkfg-color-swatch:focus {
  border-color: #063231;
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 50, 49, 0.12);
}

.zkfg-color-swatch.is-selected {
  border-color: #063231;
  background: #eef5f3;
  box-shadow: 0 0 0 3px rgba(6, 50, 49, 0.15);
}

.zkfg-color-slat {
  display: block;
  width: 72px;
  height: 56px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transition: transform 0.15s;
  overflow: hidden;
  flex-shrink: 0;
}

.zkfg-color-swatch:hover .zkfg-color-slat,
.zkfg-color-swatch.is-selected .zkfg-color-slat {
  transform: scale(1.06);
}

.zkfg-color-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.zkfg-color-label strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: #063231;
  line-height: 1.2;
}

.zkfg-color-label small {
  font-size: 0.7rem;
  color: #888;
}

/* ---- Gate toggle ---- */
.zkfg-gate-toggle.is-selected {
  border-color: #063231;
  background: #eef5f3;
}

/* ---- Extras (checkboxes) ---- */
.zkfg-extras {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.zkfg-extra {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px solid #dde8e2;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.zkfg-extra:hover,
.zkfg-extra:focus {
  border-color: #063231;
  outline: none;
}

.zkfg-extra.is-selected {
  border-color: #063231;
  background: #eef5f3;
}

.zkfg-extra-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 2px solid #b0c4bc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.zkfg-extra.is-selected .zkfg-extra-check {
  background: #063231;
  border-color: #063231;
}

.zkfg-extra.is-selected .zkfg-extra-check::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.zkfg-extra-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zkfg-extra-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: #063231;
}

.zkfg-extra-text span {
  font-size: 0.82rem;
  color: #666;
}

/* ---- Summary ---- */
.zkfg-summary {
  background: #f7faf8;
  border: 1px solid #d0e4d8;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.zkfg-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e0ebe4;
  font-size: 0.9rem;
}

.zkfg-summary-row:last-child {
  border-bottom: none;
}

.zkfg-summary-row dt {
  color: #555;
  font-weight: 500;
  flex-shrink: 0;
}

.zkfg-summary-row dd {
  color: #063231;
  font-weight: 700;
  text-align: right;
  margin: 0;
}

.zkfg-summary-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #edf5f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #0c5249;
  margin-bottom: 24px;
}

.zkfg-summary-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Navigation ---- */
.zkfg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e0e8e4;
}

/* ---- Buttons ---- */
.zkfg-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #063231;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  line-height: 1;
}

.zkfg-btn-primary:hover {
  background: #041f1e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6,50,49,0.2);
}

.zkfg-btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6,50,49,0.3);
}

.zkfg-btn-primary:disabled {
  background: #7fa395;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.zkfg-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border: 2px solid #ccc;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.zkfg-btn-back:hover {
  border-color: #063231;
  color: #063231;
}

.zkfg-btn-back:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6,50,49,0.2);
}

.zkfg-btn-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zkfg-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #555;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border: 2px solid #ccc;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.zkfg-btn-next:hover {
  border-color: #063231;
  color: #063231;
}

.zkfg-btn-next:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6,50,49,0.2);
}

.zkfg-btn-next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---- Form section ---- */
.zkfg-form-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #e0e8e4;
}

.zkfg-form-header {
  margin-bottom: 28px;
}

.zkfg-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.zkfg-fieldset {
  border: 1px solid #dde8e2;
  border-radius: 12px;
  padding: 20px 20px 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zkfg-legend {
  font-family: var(--zkfg-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #063231;
  padding: 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  word-spacing: normal;
}

.zkfg-legend-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #888;
  font-size: 0.82rem;
}

.zkfg-row {
  display: grid;
  gap: 16px;
}

.zkfg-row--2 {
  grid-template-columns: 1fr 1fr;
}

.zkfg-row--plz {
  grid-template-columns: 110px 1fr;
}

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

/* In form, inputs full width */
.zkfg-form .zkfg-input {
  max-width: 100%;
}

/* ---- DSGVO ---- */
.zkfg-dsgvo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.zkfg-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #063231;
  cursor: pointer;
}

.zkfg-dsgvo-label {
  font-size: 0.85rem;
  color: #555;
  cursor: pointer;
  line-height: 1.5;
}

.zkfg-link {
  color: #063231;
  text-decoration: underline;
}

.zkfg-link:hover {
  color: #CBFF54;
}

/* ---- Error / Success ---- */
.zkfg-error {
  background: #fdf2f2;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #c0392b;
}

.zkfg-success {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #f0f9f4;
  border: 2px solid #a3d4b4;
  border-radius: 12px;
  padding: 24px;
  color: #1e5c38;
  margin-bottom: 16px;
}

.zkfg-success svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.zkfg-success strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.zkfg-success p {
  margin: 0;
  font-size: 0.9rem;
}

/* ---- Submit row ---- */
.zkfg-submit-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.zkfg-privacy-note {
  font-size: 0.78rem;
  color: #aaa;
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .zkfg-cards {
    grid-template-columns: 1fr 1fr;
  }

  .zkfg-cards--small {
    grid-template-columns: 1fr 1fr;
  }

  .zkfg-row--2 {
    grid-template-columns: 1fr;
  }

  .zkfg-row--plz {
    grid-template-columns: 1fr 1fr;
  }

  .zkfg-colors {
    gap: 10px;
  }

  .zkfg-color-circle {
    width: 44px;
    height: 44px;
  }

  .zkfg-nav {
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .zkfg-cards {
    grid-template-columns: 1fr;
  }

  .zkfg-btn-primary,
  .zkfg-btn-next {
    width: 100%;
    justify-content: center;
  }
}
