/* ==========================================================================
   EviHosting — Kündigung / Widerruf pages
   Design tokens derived 1:1 from the existing AGB page (binding reference).
   No external resources: Inter is self-hosted (GDPR — no Google Fonts
   hotlinking). Download the woff2 files from the official Inter release
   (https://github.com/rsms/inter/releases) into /assets/fonts/
   — see README. System-font fallback keeps the page fully usable meanwhile.
   ========================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/Inter-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/Inter-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/Inter-ExtraBold.woff2') format('woff2'); }

/* Hide default WHMCS chrome exactly as on the reference page */
.main-header-title, .page-header, .breadcrumb { display: none !important; margin: 0; padding: 0; height: 0; }

.legal-page { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e293b; background: #f5f7fa; }
.legal-page * { box-sizing: border-box; }

/* ---------------- Hero (identical to reference) ---------------- */
.legal-hero { background: linear-gradient(135deg, #0d1b2e 0%, #1a3a5c 100%);
  padding: 64px 24px 56px; text-align: center; position: relative; overflow: hidden; }
.legal-hero::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 40px; background: #f5f7fa; clip-path: ellipse(55% 100% at 50% 100%); }
.legal-hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: #4da6ff; margin-bottom: 14px; }
.legal-hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: #fff; margin: 0; }
.legal-hero .legal-hero-subtitle { font-size: clamp(15px, 2vw, 18px); font-weight: 600;
  color: #4da6ff; margin: 10px 0 0; }

/* ---------------- Body (identical to reference) ---------------- */
.legal-container { max-width: 860px; margin: 0 auto; padding: 56px 24px 80px; }
.legal-section { margin-bottom: 36px; }
.legal-section h2 { font-size: 20px; font-weight: 700; color: #1a3a5c; margin: 0 0 12px; }
.legal-section h3 { font-size: 16px; font-weight: 700; color: #1a3a5c; margin: 20px 0 8px; }
.legal-section p, .legal-section li { font-size: 14px; color: #444; line-height: 1.75; margin: 0 0 12px; }
.legal-section ul { padding-left: 20px; margin: 0 0 12px; }
.legal-note { background: #edf7ff; border: 1px solid #4da6ff; border-left: 5px solid #1a3a5c;
  border-radius: 6px; padding: 14px 18px; font-size: 13px; color: #3a5070; margin: 24px 0; }
.legal-note p { margin: 4px 0; font-size: 13px; color: #3a5070; line-height: 1.7; }
.legal-note a { color: #1a3a5c; font-weight: 600; }
.legal-footer-note { font-size: 13px; color: #64748b; border-top: 1px solid #d7dee8;
  padding-top: 20px; margin-top: 12px; }
.legal-form-box { background: #fff; border: 1px solid #e0e4ea; border-radius: 10px;
  padding: 24px 28px; margin-top: 12px; }
.legal-form-box p { font-size: 14px; color: #444; line-height: 1.9; margin: 0 0 12px; }

/* ---------------- Form (new, derived from the same tokens) ---------------- */
.evi-form { background: #fff; border: 1px solid #e0e4ea; border-radius: 10px;
  padding: 28px; margin: 24px 0; }
.evi-fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.evi-fieldset legend { font-size: 16px; font-weight: 700; color: #1a3a5c;
  padding: 0; margin: 0 0 12px; }
.evi-field { margin-bottom: 16px; }
.evi-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 560px) { .evi-grid-2 { grid-template-columns: 1fr; } }

.evi-field label { display: block; font-size: 14px; font-weight: 600;
  color: #1e293b; margin-bottom: 6px; line-height: 1.5; }
.evi-hint { font-size: 13px; color: #64748b; margin: 4px 0 0; line-height: 1.6; }

.evi-input, .evi-select, .evi-textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  font: 400 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e293b; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none; }

/* Dropdown-Pfeil: URL-kodiertes Inline-SVG (charset=utf-8). Diese Kodierung
   ist die zuverlässige Variante — die rohe ";utf8,<svg …>"-Form wurde von
   manchen Browsern still ignoriert, daher fehlte der Pfeil. Keine externe
   Datei, kein CDN, DSGVO-neutral. */
.evi-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231a3a5c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 14px 14px !important;
  padding-right: 40px !important;
}
.evi-select::-ms-expand { display: none; }

.evi-textarea { min-height: 110px; resize: vertical; }
.evi-input:focus, .evi-select:focus, .evi-textarea:focus, .evi-radio input:focus-visible + span {
  outline: 2px solid #4da6ff; outline-offset: 1px; border-color: #4da6ff; }

.evi-radio-group { display: grid; gap: 10px; }
.evi-radio { display: flex; align-items: flex-start; gap: 10px; min-height: 44px;
  padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 14px; color: #1e293b; line-height: 1.5; }
.evi-radio input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1a3a5c; flex: none; }
.evi-radio:has(input:checked) { border-color: #1a3a5c; background: #edf7ff; }

/* Errors */
.evi-error-summary { background: #fff4f2; border: 1px solid #e07b6a;
  border-left: 5px solid #b3402e; border-radius: 6px; padding: 14px 18px;
  margin: 24px 0; font-size: 14px; color: #7a2d20; line-height: 1.7; }
.evi-field.has-error .evi-input, .evi-field.has-error .evi-select,
.evi-field.has-error .evi-textarea, .evi-field.has-error .evi-radio { border-color: #b3402e; }
.evi-field-error { display: block; font-size: 13px; color: #b3402e; margin-top: 5px; line-height: 1.5; }

/* Honeypot — visually removed, still submitted by naive bots */
.evi-hp { position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden; }

/* Submit — statutory button label, full visual weight, ≥44px target */
.evi-submit { display: inline-block; min-height: 48px; padding: 13px 34px;
  font: 700 16px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff; background: #1a3a5c; border: 0; border-radius: 6px; cursor: pointer; }
.evi-submit:hover { background: #0d1b2e; }
.evi-submit:focus-visible { outline: 3px solid #4da6ff; outline-offset: 2px; }
.evi-required-note { font-size: 13px; color: #64748b; margin: 14px 0 0; }

/* ---------------- Success view ---------------- */
.evi-success-head { background: #edf7ff; border: 1px solid #4da6ff;
  border-left: 5px solid #1a3a5c; border-radius: 6px; padding: 18px 22px; margin: 24px 0; }
.evi-success-head p { margin: 4px 0; font-size: 14px; color: #3a5070; line-height: 1.7; }
.evi-ref { font-size: 20px; font-weight: 800; color: #1a3a5c; letter-spacing: 0.5px; }
.evi-summary-table { width: 100%; border-collapse: collapse; margin: 12px 0 4px; }
.evi-summary-table th, .evi-summary-table td { text-align: left; vertical-align: top;
  font-size: 14px; line-height: 1.75; padding: 8px 12px 8px 0; border-bottom: 1px solid #e0e4ea; }
.evi-summary-table th { color: #1a3a5c; font-weight: 700; width: 38%; }
.evi-summary-table td { color: #444; word-break: break-word; }
.evi-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.evi-btn-secondary { display: inline-block; min-height: 48px; padding: 13px 28px;
  font: 600 15px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a3a5c; background: #fff; border: 2px solid #1a3a5c; border-radius: 6px;
  cursor: pointer; text-decoration: none; }
.evi-btn-secondary:hover { background: #edf7ff; text-decoration: none; color: #1a3a5c; }
.evi-btn-secondary:focus-visible { outline: 3px solid #4da6ff; outline-offset: 2px; }

/* ---------------- Small screens (≥360px, no horizontal scroll) ------------ */
@media (max-width: 400px) {
  .legal-container { padding: 40px 16px 64px; }
  .evi-form { padding: 20px 16px; }
  .evi-submit, .evi-btn-secondary { width: 100%; text-align: center; }
}

/* ---------------- Print (durable-medium fallback) ---------------- */
@media print {
  .legal-hero { background: #fff !important; padding: 0 0 12px; }
  .legal-hero::after { display: none; }
  .legal-hero h1, .legal-hero .legal-hero-subtitle,
  .legal-hero-eyebrow { color: #000 !important; }
  .evi-actions, .evi-submit, nav, header, footer { display: none !important; }
  .legal-page { background: #fff; }
}