/* ═════════════════════════════════════════════════════════════════════
   Alpenzaun — Widerrufsformular (online form + print-to-PDF)
   Visual: matchuje Impressum/Datenschutz — accent #f04e23
   Print: optimalizované pre A4 PDF (čistý layout, žiadne tlačidlá)
   ═════════════════════════════════════════════════════════════════════ */

.aze-wd-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1f2937;
  line-height: 1.6;
}

/* ─── HERO ──────────────────────────────────────────────────────────── */
.aze-wd-hero {
  text-align: center;
  margin-bottom: 36px;
  padding: 24px 16px;
}
.aze-wd-logo {
  max-height: 56px;
  max-width: 220px;
  display: block;
  margin: 0 auto 18px;
  object-fit: contain;
}
.aze-wd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(240, 78, 35, 0.08);
  color: #f04e23;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.aze-wd-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f04e23;
  box-shadow: 0 0 8px rgba(240, 78, 35, 0.5);
}
.aze-wd-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: #0f172a;
}
.aze-wd-title-accent {
  color: #f04e23;
}
.aze-wd-intro {
  font-size: 15.5px;
  color: #475569;
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ─── FORM ──────────────────────────────────────────────────────────── */
.aze-wd-form { margin: 0; }

/* ─── CARDS (fieldset) ──────────────────────────────────────────────── */
.aze-wd-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.aze-wd-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.aze-wd-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  float: none;
}
.aze-wd-card-head svg {
  width: 20px;
  height: 20px;
  color: #f04e23;
  flex-shrink: 0;
}

/* ─── GRID (form layout) ────────────────────────────────────────────── */
.aze-wd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.aze-wd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.aze-wd-field-full { grid-column: 1 / -1; }
.aze-wd-field-half { max-width: 280px; }

.aze-wd-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.aze-wd-lbl em {
  color: #f04e23;
  font-style: normal;
  margin-left: 2px;
}
.aze-wd-lbl small {
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

.aze-wd-field input[type="text"],
.aze-wd-field input[type="email"],
.aze-wd-field input[type="tel"],
.aze-wd-field input[type="date"],
.aze-wd-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font: 500 14.5px Inter, sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.aze-wd-field input:focus,
.aze-wd-field textarea:focus {
  border-color: #f04e23;
  box-shadow: 0 0 0 3px rgba(240, 78, 35, 0.12);
}
.aze-wd-field textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .aze-wd-grid { grid-template-columns: 1fr; }
  .aze-wd-field-half { max-width: none; }
}

.aze-wd-decl-intro {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: #475569;
  font-style: italic;
  line-height: 1.55;
}

/* ─── PRIVACY HINT + CONSENT ────────────────────────────────────────── */
.aze-wd-privacy {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(240, 78, 35, 0.05);
  border: 1px solid rgba(240, 78, 35, 0.18);
  border-radius: 10px;
  margin-bottom: 14px;
}
.aze-wd-privacy svg {
  width: 22px;
  height: 22px;
  color: #f04e23;
  flex-shrink: 0;
  margin-top: 2px;
}
.aze-wd-privacy p {
  margin: 0;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
}
.aze-wd-privacy strong { color: #0f172a; }

.aze-wd-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: #1f2937;
  cursor: pointer;
}
.aze-wd-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #f04e23;
  flex-shrink: 0;
  cursor: pointer;
}
.aze-wd-consent em {
  color: #f04e23;
  font-style: normal;
}

/* ─── ACTIONS ───────────────────────────────────────────────────────── */
.aze-wd-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.aze-wd-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 30px;
  border-radius: 10px;
  font: 700 14.5px Inter, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 0;
  transition: all 0.15s;
  text-decoration: none;
}
.aze-wd-btn svg {
  width: 16px;
  height: 16px;
}
.aze-wd-btn-primary {
  background: #f04e23;
  color: #fff;
  box-shadow: 0 4px 14px rgba(240, 78, 35, 0.28);
  min-width: 220px;
  justify-content: center;
}
.aze-wd-btn-primary:hover {
  background: #d9431d;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(240, 78, 35, 0.4);
}
.aze-wd-btn-primary.is-loading,
.aze-wd-btn-primary[disabled] {
  background: #f04e23;
  opacity: 0.85;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
.aze-wd-btn-primary.is-loading:hover {
  transform: none;
  background: #f04e23;
}
.aze-wd-spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: azeWdSpin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes azeWdSpin {
  to { transform: rotate(360deg); }
}
.aze-wd-btn-secondary {
  background: #fff;
  color: #1f2937;
  border: 1px solid #d1d5db;
}
.aze-wd-btn-secondary:hover {
  border-color: #f04e23;
  color: #f04e23;
}

.aze-wd-actions-hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #64748b;
  text-align: center;
}
.aze-wd-actions-hint strong { color: #1f2937; }

/* ─── SUCCESS PAGE ──────────────────────────────────────────────────── */
.aze-wd-success-wrap { max-width: 640px; }
.aze-wd-success {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.aze-wd-success-ico {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #f04e23;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(240, 78, 35, 0.3);
}
.aze-wd-success-ico svg {
  width: 40px;
  height: 40px;
}
.aze-wd-success-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: #0f172a;
}
.aze-wd-success-body {
  font-size: 15px;
  color: #475569;
  margin: 0 0 28px;
  line-height: 1.65;
}
.aze-wd-success-contact {
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}
.aze-wd-success-contact p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #64748b;
}
.aze-wd-success-contact p:last-child {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.aze-wd-success-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(240, 78, 35, 0.08);
  color: #f04e23;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(240, 78, 35, 0.2);
  transition: all 0.15s;
}
.aze-wd-success-link:hover {
  background: #f04e23;
  color: #fff;
  border-color: #f04e23;
  transform: translateY(-1px);
}
.aze-wd-success-link svg {
  width: 15px;
  height: 15px;
}

/* ═════════════════════════════════════════════════════════════════════
   PRINT STYLES — keď user klikne „Als PDF drucken" → window.print()
   ═════════════════════════════════════════════════════════════════════ */
@media print {
  /* Page setup */
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #1f2937 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* CLONE-TO-ROOT trick: keď JS přidá body.aze-wd-printing, skryjeme všetko
     okrem nášho #aze-wd-print-root containera. Tým obídeme WP/Elementor/Astra
     wrappery ktoré by inak interferovali s display:none selectormi. */
  body.aze-wd-printing > *:not(#aze-wd-print-root) {
    display: none !important;
  }
  body.aze-wd-printing #aze-wd-print-root {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Reset wrap vnútri print root */
  #aze-wd-print-root .aze-wd-wrap {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Skry interaktívne elementy vnútri formulára */
  .aze-wd-actions, .aze-wd-actions-hint,
  .aze-wd-eyebrow, .aze-wd-consent { display: none !important; }

  /* Hero kompaktnejší */
  .aze-wd-hero {
    text-align: left;
    padding: 0 0 16px;
    margin-bottom: 18px;
    border-bottom: 2px solid #f04e23;
  }
  .aze-wd-title {
    font-size: 24pt !important;
    margin: 0 0 6px;
  }
  .aze-wd-title-accent {
    -webkit-text-fill-color: #f04e23;
    color: #f04e23;
  }
  .aze-wd-intro {
    font-size: 10pt;
    color: #1f2937 !important;
    margin: 0;
    max-width: none;
  }

  /* Cards bez shadow + clean */
  .aze-wd-card {
    box-shadow: none !important;
    border: 1px solid #94a3b8 !important;
    page-break-inside: avoid;
    margin-bottom: 12px;
    padding: 14px 18px;
  }
  .aze-wd-card-head {
    font-size: 12pt;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .aze-wd-card-head svg { display: none; }

  /* Form fields ako čitateľné texty pre print (vyplnené hodnoty viditeľné) */
  .aze-wd-field input,
  .aze-wd-field textarea {
    border: 0 !important;
    border-bottom: 1px solid #94a3b8 !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    background: transparent !important;
    font-size: 10.5pt !important;
    color: #0f172a !important;
    box-shadow: none !important;
    /* Browser-specific — niektoré prehliadače skryjú text v inputs pri print bez týchto */
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .aze-wd-field textarea {
    min-height: 60px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    /* Textarea musí mať dostatočnú výšku aby sa text zobrazil — nech browser
       neskráti obsah na 1 riadok. Min-height nastavený, ale necháme grow. */
    height: auto !important;
    overflow: visible !important;
  }
  .aze-wd-field input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
  .aze-wd-lbl {
    font-size: 8.5pt;
    color: #475569 !important;
    margin-bottom: 2px;
  }

  /* Privacy hint kompaktnejší */
  .aze-wd-privacy {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    padding: 10px 14px;
    margin: 18px 0 0;
  }
  .aze-wd-privacy p {
    font-size: 9pt;
    color: #475569 !important;
  }
  .aze-wd-privacy svg { display: none; }

  /* Pridaj footer s podpisom */
  .aze-wd-form::after {
    content: 'Datum: ............................     Unterschrift: ......................................................';
    display: block;
    margin-top: 30pt;
    padding-top: 18pt;
    border-top: 1px dashed #94a3b8;
    font-size: 11pt;
    color: #1f2937;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 15mm 16mm 18mm;
  }

  /* Vyhni sa zalomeniam vnútri kariet */
  .aze-wd-card { page-break-inside: avoid; }
  .aze-wd-card-head { page-break-after: avoid; }
}
