/* Presentation only. Base campaign v2.3.0 and all interaction code stay intact. */

/* Google permits hidden branding badges when visible branding remains in the flow.
   Fail open: without the replacement text (or :has support), the badge stays visible.
   Only the branding badge is hidden, never challenge dialogs or reCAPTCHA scripts. */
body.page-id-1889:has(#egger-fenix9-v5 #egger-fenix9-recaptcha-notice) .grecaptcha-badge {
  visibility: hidden !important;
}

#egger-fenix9-v5 #egger-fenix9-recaptcha-notice {
  display: block;
  margin: 14px 0 0;
  color: #aaa9a2;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

/* The theme's fixed 40px select height conflicts with the campaign's padding. */
#egger-fenix9-v5 #interestForm select {
  height: auto;
  min-height: 52px;
  margin-bottom: 0;
  padding: 12px 40px 12px 14px;
  font-size: 16px;
  line-height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23e1c992' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

/* Keep labels and values aligned despite the theme's table-cell defaults. */
#egger-fenix9-v5 .technical-table th,
#egger-fenix9-v5 .technical-table td,
#egger-fenix9-v5 .comparison th,
#egger-fenix9-v5 .comparison td,
#egger-fenix9-v5 .variant-table th,
#egger-fenix9-v5 .variant-table td {
  vertical-align: top !important;
}

@media (max-width: 980px) {
  /* These two controls belong to separate plugins. Keep both operable/visible. */
  body.page-id-1889 .qlwapp__container.qlwapp__container--bottom-right {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.page-id-1889:has(#egger-fenix9-v5 #egger-fenix9-recaptcha-notice) .qlwapp__container.qlwapp__container--bottom-right {
    bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  #egger-fenix9-v5 footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  /* Reflow the existing tables. No copied product data or new event handlers. */
  #egger-fenix9-v5 .technical-table-wrap,
  #egger-fenix9-v5 .comparison,
  #egger-fenix9-v5 .variant-table {
    overflow: visible;
    min-width: 0;
  }

  #egger-fenix9-v5 .technical-table,
  #egger-fenix9-v5 .comparison table,
  #egger-fenix9-v5 .variant-table table {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  /* Retain real column headers in the document for assistive technology. */
  #egger-fenix9-v5 .technical-table thead,
  #egger-fenix9-v5 .comparison thead,
  #egger-fenix9-v5 .variant-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #egger-fenix9-v5 .technical-table tbody,
  #egger-fenix9-v5 .comparison tbody,
  #egger-fenix9-v5 .variant-table tbody { display: block; }

  #egger-fenix9-v5 .technical-table tbody tr,
  #egger-fenix9-v5 .comparison tbody tr,
  #egger-fenix9-v5 .variant-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    padding-block: 18px;
  }

  #egger-fenix9-v5 .technical-table tbody th,
  #egger-fenix9-v5 .comparison tbody th,
  #egger-fenix9-v5 .variant-table tbody th {
    grid-column: 1 / -1;
    display: block;
    width: auto;
    padding: 0 12px 12px;
    border: 0 !important;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.4;
  }

  #egger-fenix9-v5 .technical-table tbody td,
  #egger-fenix9-v5 .comparison tbody td,
  #egger-fenix9-v5 .variant-table tbody td {
    display: block;
    min-width: 0;
    width: auto;
    padding: 10px 12px;
    border: 0 !important;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #egger-fenix9-v5 .technical-table tbody td::before,
  #egger-fenix9-v5 .comparison tbody td::before,
  #egger-fenix9-v5 .variant-table tbody td::before {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
  }

  #egger-fenix9-v5 .technical-table tbody td:nth-child(2)::before { content: "Vergleichsmodell"; }
  #egger-fenix9-v5 .technical-table tbody td:nth-child(3)::before { content: "fēnix 9 Pro inReach"; }
  #egger-fenix9-v5 .technical-table tbody td:last-child { border-radius: 10px; }
  #egger-fenix9-v5 .tech-feature strong { font-size: 14px; line-height: 1.4; }
  #egger-fenix9-v5 .tech-feature span { font-size: 13px; line-height: 1.5; }
  #egger-fenix9-v5 .technical-table tbody tr:last-child,
  #egger-fenix9-v5 .comparison tbody tr:last-child,
  #egger-fenix9-v5 .variant-table tbody tr:last-child { border-bottom: 0; }

  #egger-fenix9-v5 .comparison { padding: 4px; }
  #egger-fenix9-v5 .comparison tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #egger-fenix9-v5 .comparison tbody td { padding: 8px; }
  #egger-fenix9-v5 .comparison tbody td:nth-child(2)::before { content: "43 mm"; }
  #egger-fenix9-v5 .comparison tbody td:nth-child(3)::before { content: "47 mm"; }
  #egger-fenix9-v5 .comparison tbody td:nth-child(4)::before { content: "51 mm"; }

  #egger-fenix9-v5 .variant-table tbody tr { grid-template-columns: minmax(0, 1fr); }
  #egger-fenix9-v5 .variant-table tbody td { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }
  #egger-fenix9-v5 .variant-table tbody td::before { margin: 0; }
  #egger-fenix9-v5 .variant-table .tag { grid-column: 2; justify-self: start; margin: 0; }
  #egger-fenix9-v5 .variant-details details:first-child td:nth-child(2)::before { content: "Garmin Nr."; }
  #egger-fenix9-v5 .variant-details details:first-child td:nth-child(3)::before { content: "Ausführung"; }
  #egger-fenix9-v5 .variant-details details:first-child td:nth-child(4)::before { content: "UVP AT"; }
  #egger-fenix9-v5 .variant-details details:nth-child(2) td:nth-child(2)::before { content: "43 mm"; }
  #egger-fenix9-v5 .variant-details details:nth-child(2) td:nth-child(3)::before { content: "47 mm"; }
  #egger-fenix9-v5 .variant-details details:nth-child(2) td:nth-child(4)::before { content: "51 mm"; }
}

@media (max-width: 680px) {
  #egger-fenix9-v5 .nav { min-height: 80px; flex-wrap: nowrap; gap: 12px; padding-block: 8px; }
  #egger-fenix9-v5 .brand { min-width: 0; flex: 0 1 104px; }
  #egger-fenix9-v5 .brand img { width: 104px; max-height: 72px; object-fit: contain; }
  #egger-fenix9-v5 .nav-links { flex: 0 0 auto; gap: 0; }
  #egger-fenix9-v5 .nav-cta { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }

  #egger-fenix9-v5 section { padding-block: 56px; }
  #egger-fenix9-v5 .hero { padding: 30px 0 40px; }
  #egger-fenix9-v5 .hero .eyebrow { margin-bottom: 12px; letter-spacing: .1em; }
  #egger-fenix9-v5 .hero h1 { font-size: clamp(2.5rem, 12vw, 3.35rem); line-height: 1; }
  #egger-fenix9-v5 .hero-copy { margin-top: 18px; line-height: 1.5; }
  #egger-fenix9-v5 .hero-actions { margin-top: 22px; gap: 10px; }
  #egger-fenix9-v5 .hero-facts { margin-top: 18px; gap: 8px; }
  #egger-fenix9-v5 .hero-grid { gap: 10px; }
  #egger-fenix9-v5 .hero-product { min-height: 0; margin: 0; padding-bottom: 24px; }
  #egger-fenix9-v5 .hero-product img { width: min(100%, 360px); }
  #egger-fenix9-v5 .hero-card { position: relative; width: 100%; bottom: auto; right: auto; margin-top: -18px; }

  #egger-fenix9-v5 .section-head { margin-bottom: 26px; }
  #egger-fenix9-v5 .service-intro { min-height: 0; justify-content: flex-start; padding: 28px 22px; }
  #egger-fenix9-v5 .service-intro h2 { font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.07; }
  #egger-fenix9-v5 .service-intro p:last-child { margin: 16px 0 0; }
  #egger-fenix9-v5 .service-card { min-height: 0; padding: 24px 22px; }
  #egger-fenix9-v5 .service-card h3 { margin-top: 16px; font-size: 1.25rem; line-height: 1.25; }
  #egger-fenix9-v5 .color-swatch { width: 44px; height: 44px; }

  #egger-fenix9-v5 #interestForm .field input,
  #egger-fenix9-v5 #interestForm textarea { font-size: 16px; line-height: 24px; }
  #egger-fenix9-v5 #interestForm .consent { font-size: 13px; line-height: 1.5; }
  #egger-fenix9-v5 #interestForm .consent input { flex: 0 0 20px; width: 20px; height: 20px; }
  #egger-fenix9-v5 .consultation-copy,
  #egger-fenix9-v5 .consultation-form { padding: 28px 18px; }
  #egger-fenix9-v5 .contact-data { margin-top: 24px; }
}

/* Long benefits remain readable on phones, including the narrowest displays. */
@media (max-width: 480px) {
  #egger-fenix9-v5 .technical-table tbody tr { grid-template-columns: minmax(0, 1fr); }
  #egger-fenix9-v5 .technical-table tbody td:nth-child(2) { padding-top: 0; padding-bottom: 16px; }
  #egger-fenix9-v5 .technical-table tbody td::before { margin-bottom: 5px; }
  #egger-fenix9-v5 .tech-feature span { font-size: 14px; }
}
