/*
 * ZEISS Cashback theme — adapted from the original Drupal zeiss_bootstrap
 * theme onto Bootstrap 5 markup. Colors, fonts and component look are taken
 * from the real compiled style.css pulled from the live site (identical
 * values to the sibling zei-c-001 Waidgefährte theme — same agency base).
 */

/* Reverted: declaring one static file as covering weight 400 700 told the
   browser to trust it already has bold glyphs, which skipped synthesis
   entirely and made bold text render at plain regular weight (confirmed —
   OG's bold text is visibly heavier than that produced). Back to two
   distinct faces so weight:700 actually renders bold. */
@font-face {
  font-family: 'ZEISS Frutiger Next';
  src: url('../fonts/ZEISSFrutigerNextW1G-Reg.woff2') format('woff2');
  font-weight: 400;
}

@font-face {
  font-family: 'ZEISS Frutiger Next';
  src: url('../fonts/ZEISSFrutigerNextW1G-Bold.woff2') format('woff2');
  font-weight: 700;
}

/* .headline1-bold is the one confirmed exception (Fonts-tab: OG's own
   "ZEISS Cashback" h2 uses the Regular file even at weight:700, not the
   Bold face) — a dedicated alias so just that class gets the lighter
   rendering while everything else keeps the real Bold file above. */
@font-face {
  font-family: 'ZEISS Frutiger Next Headline';
  src: url('../fonts/ZEISSFrutigerNextW1G-Reg.woff2') format('woff2');
  font-weight: 700;
}

:root {
  --zeiss-blue: #008BD0;
  --zeiss-blue-dark: #141E8C;
  --zeiss-blue-hover: #006699;
  --zeiss-grey: #4A4A4A;
  --zeiss-grey-light: #B0B0B0;
  --zeiss-grey-bg: #F5F5F5;
  --zeiss-text: #555555;
}

body {
  font-family: 'ZEISS Frutiger Next', Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #222;
}

.container-zeiss {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

main[role="main"] {
  /* Without this, the h2's margin-top escapes upward through
     .container-zeiss/article and collapses with .header-banner's
     margin-bottom instead of adding to it (confirmed: h2 margin-top is
     correctly 20px, but the visible gap only ever reflected 30px, the
     larger of the two collapsed values). flow-root traps child margins
     inside main so both values actually stack. */
  display: flow-root;
}

/* Header / navigation */

.site-header .navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-header .navbar-nav .nav-link {
  /* Confirmed OG splits these: base links are #777 and regular weight,
     .active is a darker #555 and bold — not the same color/weight for
     both, which is what was flattening the active/inactive contrast. */
  color: #777777;
  font-weight: normal;
  padding: 10px 15px;
}

.site-header .nav-link.active {
  color: #555555;
  font-weight: bold;
}

.site-header .nav-link:hover {
  color: var(--zeiss-blue-hover);
}

/* OG's nav always sits on its own row below the logo (confirmed: navbar-header
   1140x97, navbar-collapse 1155x50 stacked beneath with margin-top:15px), not
   Bootstrap's usual inline-at-desktop behavior. */
.site-header .navbar > .container-zeiss {
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .site-header .navbar-toggler {
    display: none;
  }

  .site-header .navbar-collapse {
    display: block !important;
    flex-basis: 100%;
    margin-top: 15px;
    margin-left: -15px;
  }

  .site-header .navbar-nav {
    flex-direction: row;
    margin: 0;
    padding-left: 0;
  }
}

.header-banner {
  margin: 0 0 30px;
  line-height: 0;
}

/* Full-bleed flash-message banner (e.g. after a contact-form submission
   redirects back to the homepage), matching the real site's layout — a
   full-width strip between the header and the page content, not a boxed
   alert sitting inline in the content column. */
.site-status-banner {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background-color: #d1e7dd;
  color: #0f5132;
  padding: 1rem 0;
  margin-bottom: 30px;
}

.header-banner img {
  width: 100%;
  display: block;
}

/* Headings */

h1 {
  font-size: 36px;
}

h2 {
  font-size: 30px;
  line-height: 1.1;
  margin-top: 20px;
  margin-bottom: 10px;
}

.headline1-bold {
  font-family: 'ZEISS Frutiger Next Headline', Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.headline1-reg {
  font-weight: 500;
  margin-top: -10px;
}

.headline1-center {
  text-align: center;
  text-transform: uppercase;
  color: #E1172B;
}

/* Contact page */

.contact-form-band {
  /* Confirmed: the OG's webform itself is container-fluid with an inline
     background-color:#F5F5F5, i.e. full-bleed like the Ablauf band — same
     100vw breakout technique. */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background-color: var(--zeiss-grey-bg);
  margin-top: 25px;
  padding: 25px 0;
}

.confirmation-band {
  /* Same full-bleed grey band technique as .contact-form-band/.ablauf-steps
     — confirmed the OG wraps the whole confirmation message in one. */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background-color: var(--zeiss-grey-bg);
  padding: 25px 0;
}

.confirmation-heading {
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Buttons */

.zeiss-btn-main {
  background-color: var(--zeiss-blue);
  border: none;
  border-radius: 0;
  font-weight: 700;
  padding: 10px 25px;
  color: #fff;
  text-decoration: none;
  display: inline-block;
}

.zeiss-btn-main:hover,
.zeiss-btn-main:focus,
.zeiss-btn-main:active {
  background-color: var(--zeiss-blue);
  color: #fff;
}

/* Home page */

.home-intro {
  margin-top: 1rem;
}

.ablauf-steps {
  /* Confirmed 1920x279.7 (full viewport width) on the OG, not confined to
     the normal content column — break out of the parent .container-zeiss
     to a full-bleed band, same technique as Emporia's header banner. */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background-color: var(--zeiss-grey-bg);
  margin-top: 25px;
  margin-bottom: 25px;
  padding: 25px 0;
}

.ablauf-step {
  /* No inter-row margin — the OG relies purely on each row's own
     padding-top:20px for spacing, not a separate row gap (confirmed via
     the ~32px content-height mismatch this row margin was causing). */
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.ablauf-step-icon {
  flex: 0 0 auto;
  vertical-align: middle;
}

.ablauf-step-text {
  /* OG uses a two-column Bootstrap row (icon column + text column with its
     own padding-top:20px), not true flex vertical-centering — replicating
     the same manual offset here rather than align-items:center. */
  padding-top: 20px;
}

.home-cta {
  text-align: center;
  margin: 2rem 0 1rem;
}

/* Country / promo selection */

.country-select-heading,
.promo-select-heading {
  /* Confirmed inline style on the OG's own <p>: text-align:center;
     font-weight:bold; font-size:30px; padding:35px (all sides). */
  text-align: center;
  font-weight: 700;
  font-size: 30px;
  padding: 35px;
}

.country-grid {
  /* Confirmed: a real 2-column grid (views-view-grid, each column
     width:50%), not a centered flex cluster. */
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 2rem;
}

.promo-grid {
  /* Confirmed: this views grid uses 3 columns (33.333% each), not 2 —
     only cols-1 is populated with the one live campaign right now. */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2rem;
}

.country-card {
  text-align: center;
}

.country-card a {
  display: block;
  color: var(--zeiss-text);
  text-decoration: none;
  font-weight: 700;
}

.country-flag {
  /* Confirmed via Computed: OG has a scoped override shrinking these
     below their native asset size (120x80, not the 200x120/180x120 the
     img tags' own width/height attributes would otherwise render at),
     centered, no border (confirmed border-style:none). display:block so
     the label text wraps onto its own line below instead of sitting
     inline beside the flag. */
  display: block;
  width: 120px;
  height: 80px;
  margin: 0 auto 0.5rem;
}

.promo-card {
  /* Confirmed: plain content flow on the OG (<article class="promos full
     clearfix">) — no background, no padding box, no centering. Text
     wraps at the image's own native width (300px), not the wider grid
     column, matching the OG exactly. justify-self:start stops the grid
     item from stretching to fill its column before max-width even gets
     a chance to apply. */
  max-width: 300px;
  justify-self: start;
}

.promo-card-image {
  max-width: 100%;
  height: auto;
}

.promo-card .zeiss-btn-main {
  margin-top: 1rem;
}

.promo-card a:not(.zeiss-btn-main) {
  text-decoration: none;
}

/* Registration wizard */

.wizard-progress {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 3.75rem 0;
}

.wizard-progress li {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 13px;
  color: var(--zeiss-text);
}

.wizard-progress li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--zeiss-grey);
  z-index: 0;
}

.wizard-progress li.is-complete:not(:last-child)::after {
  background: var(--zeiss-grey);
}

.wizard-progress li .marker {
  position: relative;
  z-index: 1;
  display: block;
  width: 28px;
  height: 28px;
  line-height: 26px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: thin solid var(--zeiss-grey);
  background: rgb(182, 182, 182);
  color: #fff;
  font-weight: 600;
}

.wizard-progress li.is-active .marker {
  background: var(--zeiss-blue-dark);
  border-color: var(--zeiss-blue-dark);
  color: #fff;
}

.wizard-progress li.is-complete .marker {
  background: var(--zeiss-grey);
  border-color: var(--zeiss-grey);
  color: #fff;
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.wizard-step-intro {
  margin-bottom: 14px;
  text-align: center;
  color: #444;
}

.wizard-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 25px 0;
}

.pflichtfeld-note {
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: #333333;
}

.form-label {
  font-weight: 700;
  color: var(--zeiss-text);
  margin-bottom: 5px;
  display: inline-block;
}

/* Field help tooltip ("?" icon shown next to a label) — same pattern as
   the sibling Emporia/zei-c-001 builds, since this theme didn't have it. */

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--zeiss-grey-light);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: Arial, sans-serif;
  line-height: 1;
  cursor: help;
  position: relative;
  vertical-align: middle;
  transition: background-color 0.15s ease-in-out;
}

.help-icon:hover,
.help-icon:focus,
.help-icon:focus-within {
  background: var(--zeiss-blue);
}

.help-icon-tooltip {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 260px;
  max-width: 80vw;
  background: #333;
  color: #fff;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: normal;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  display: none;
  z-index: 10;
}

.help-icon-tooltip-heading {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.help-icon-tooltip a {
  color: var(--zeiss-blue);
  text-decoration: none;
}

.help-icon:hover .help-icon-tooltip,
.help-icon:focus .help-icon-tooltip,
.help-icon:focus-within .help-icon-tooltip {
  display: block;
}

.form-control,
.form-select {
  font-size: 14px;
  color: var(--zeiss-text);
  border-radius: 0;
}

/* Bring Select2 (dealer search) roughly in line with the site's own
   .form-control sizing/border — its default theme is unstyled otherwise. */
.select2-container--default .select2-selection--single {
  height: 34px;
  border-radius: 0;
  border-color: #ccc;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 34px;
  font-size: 14px;
  color: var(--zeiss-text);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 32px;
}

/* Bootstrap adds a red exclamation-mark icon (plus right padding to make
   room for it) to every .is-invalid field by default — removed site-wide
   per request, keeping only the red border as the invalid indicator. */
.form-control.is-invalid,
.form-control.is-invalid:focus {
  background-image: none;
  padding-right: .75rem;
}

.form-select.is-invalid:not([multiple]):not([size]) {
  --bs-form-select-bg-icon: none;
  padding-right: 2.25rem;
  background-image: var(--bs-form-select-bg-img);
  background-position: right .75rem center;
  background-size: 16px 12px;
}

/* The real <select> carries .is-invalid, but Select2 renders its own visible
   box as the next sibling — style that instead of the (hidden) select. */
select.is-invalid.select2-hidden-accessible + .select2-container--default .select2-selection--single {
  border-color: red;
}

.error.form-item--error-message {
  display: block;
  color: red;
  font-weight: normal;
  margin-top: 10px;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border: thin solid red;
}

.file-upload-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  cursor: pointer;
}

.file-upload-control .file-upload-button {
  background: #e9ecef;
  padding: 4px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.file-upload-control .file-upload-filename {
  font-size: 13px;
  color: var(--zeiss-text);
}

.file-upload-control .file-upload-size {
  font-size: 12px;
  color: var(--zeiss-grey);
  margin-left: auto;
  white-space: nowrap;
}

.file-upload-remove {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--zeiss-grey);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.file-upload-remove:hover {
  background: #e9ecef;
  color: #b00020;
}

.file-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.iban-check-feedback,
.code-check-feedback {
  color: red;
  margin-top: 10px;
}

.cashback-feedback {
  color: var(--zeiss-blue-dark);
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Footer */

.site-footer {
  max-width: 1170px;
  margin: 45px auto 0;
  padding: 10px 15px;
  border-top: 1px solid #E5E5E5;
}

.site-footer .footer-links {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.site-footer .footer-links a {
  display: inline-block;
  padding: 10px 15px;
  color: #909090;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

.form-check-label a,
.pflichtfeld-note a {
  color: #337ab7;
  text-decoration: none;
}

@media (max-width: 700px) {
  .wizard-progress {
    flex-wrap: wrap;
    gap: 0.75rem 0;
  }

  .wizard-progress li {
    flex: 0 0 50%;
  }

  .wizard-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .ablauf-step {
    flex-direction: column;
    align-items: flex-start;
  }
}
