/* HM Angebotsformular 0.1.9 – styles strictly scoped to the shortcode. */
.hm-af {
  --hm-af-green: #005e52;
  --hm-af-hover: #00a075;
  --hm-af-orange: #e56b20;
  --hm-af-ink: #222222;
  --hm-af-muted: #626c67;
  --hm-af-border: #d8e4df;
  --hm-af-pale: #edf6f2;
  --hm-af-focus: #d5eee5;
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  color: var(--hm-af-ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  container-type: inline-size;
}
.hm-af, .hm-af *, .hm-af *::before, .hm-af *::after { box-sizing: border-box; }
.hm-af [hidden] { display: none !important; }
.hm-af button, .hm-af input, .hm-af select {
  font-family: inherit;
  font-size: inherit;
}
.hm-af button { cursor: pointer; }
.hm-af .hm-af-shell {
  width: 100%;
  max-width: none;
  min-width: 0;
  background: #fff;
  border: 1px solid #e0e8e4;
  border-radius: 20px;
  box-shadow: 0 12px 38px rgba(0,58,45,.075);
  overflow: visible;
}
.hm-af .hm-af-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  text-align: left;
  padding: 14px 23px;
  border-bottom: 1px solid #edf0ef;
}
.hm-af .hm-af-logo {
  display: block;
  width: 100px;
  max-width: 100%;
  height: auto;
  flex: 0 0 100px;
  margin: 0;
  border-radius: 7px;
}
.hm-af .hm-af-brand-copy { min-width: 0; flex: 1 1 auto; }
.hm-af .hm-af-brand-title {
  margin: 0 0 2px;
  color: var(--hm-af-green);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}
.hm-af .hm-af-brand p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--hm-af-ink); }
.hm-af .hm-af-main { width: 100%; min-width: 0; padding: 19px 23px 25px; }
.hm-af .hm-af-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; color: var(--hm-af-ink); font-size: 1rem;
}
.hm-af .hm-af-progress-head strong { font-size: 1rem; color: var(--hm-af-ink); }
.hm-af .hm-af-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 8px 0 20px; }
.hm-af .hm-af-progress span { display: block; height: 5px; background: #e1e9e5; border-radius: 8px; }
.hm-af .hm-af-progress span.hm-af-progress-active { background: var(--hm-af-green); }
.hm-af h3 {
  margin: 0 0 15px;
  color: var(--hm-af-green);
  font-family: inherit;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
}
.hm-af .hm-af-intro {
  border: 1px solid #cfe3d9; background: #f0f8f4;
  border-radius: 12px; padding: 12px 14px; margin: 0 0 18px;
}
.hm-af .hm-af-intro strong { display: block; font-size: 1rem; color: var(--hm-af-green); margin-bottom: 4px; }
.hm-af .hm-af-intro p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--hm-af-ink); }
.hm-af .hm-af-field { margin: 0 0 15px; position: relative; }
.hm-af .hm-af-animal-hint { margin: 9px 0 0; color: var(--hm-af-muted); font-size: 1rem; }
.hm-af .hm-af-field > label, .hm-af .hm-af-field legend {
  display: block; margin: 0 0 7px; padding: 0;
  color: var(--hm-af-ink); font-size: 1rem; font-weight: 600; line-height: 1.5;
}
.hm-af .hm-af-fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 16px; }
.hm-af .hm-af-required { color: #b54429; }
.hm-af .hm-af-input, .hm-af .hm-af-select {
  display: block; width: 100%; max-width: 100%;
  border: 1px solid #cbd9d2; border-radius: 10px;
  padding: 10px 13px; min-height: 45px; height: auto;
  background: #fff; color: var(--hm-af-ink);
  font-size: 1rem; font-weight: 400; box-shadow: none;
}
.hm-af .hm-af-input::placeholder { color: #81928a; opacity: 1; }
.hm-af .hm-af-input:focus, .hm-af .hm-af-select:focus {
  outline: none; border-color: var(--hm-af-green);
  box-shadow: 0 0 0 3px var(--hm-af-focus);
}
.hm-af .hm-af-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hm-af .hm-af-segment button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 0; min-height: 43px; padding: 8px 10px;
  border: 1px solid var(--hm-af-border);
  border-radius: 2rem; background: #fff; color: var(--hm-af-ink);
  font-size: 1rem; font-weight: 700; line-height: 1.3;
  transition: background .15s, border .15s, color .15s;
}
.hm-af .hm-af-segment button[aria-pressed="true"] {
  background: var(--hm-af-green); border-color: var(--hm-af-green); color: #fff;
}
.hm-af .hm-af-segment button:hover {
  background: var(--hm-af-hover); border-color: var(--hm-af-hover); color: #fff;
}
.hm-af .hm-af-animal-choice { min-height: 66px !important; }
.hm-af .hm-af-animal-choice img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; flex: none; }
.hm-af .hm-af-animal-choice span { font-size: 1rem; font-weight: 700; }
.hm-af button:focus-visible, .hm-af input:focus-visible, .hm-af select:focus-visible {
  outline: 3px solid #a0ddd0; outline-offset: 2px;
}
.hm-af .hm-af-mix-switch {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1rem; margin: 1px 0 12px;
  cursor: pointer; color: var(--hm-af-green); font-weight: 600;
}
.hm-af .hm-af-mix-switch input, .hm-af .hm-af-channel input,
.hm-af .hm-af-privacy input, .hm-af .hm-af-radio-tile input {
  accent-color: var(--hm-af-green); width: 18px; height: 18px; margin: 0; flex: none;
}
.hm-af .hm-af-mix-area {
  padding: 10px 12px 8px; background: #f5faf8;
  border-radius: 11px; margin-bottom: 13px;
}
.hm-af .hm-af-mix-area p { font-size: 1rem; color: var(--hm-af-ink); margin: 0 0 8px; }
.hm-af .hm-af-mix-area button { font-size: 1rem; }
.hm-af .hm-af-two { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.hm-af .hm-af-radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hm-af .hm-af-radio-tile {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--hm-af-border); border-radius: 10px;
  padding: 10px 11px; min-height: 44px; cursor: pointer;
  font-weight: 600; font-size: 1rem;
}
.hm-af .hm-af-radio-tile:has(input:checked) { background: var(--hm-af-pale); border-color: var(--hm-af-green); }
/* Compact rows, with space between the input circle, copy and recommendation pill. */
.hm-af .hm-af-channel {
  display: grid; grid-template-columns: 24px minmax(0,1fr); column-gap: 18px;
  align-items: center; min-height: 29px; padding: 2px 0;
  margin: 0 0 7px; border: 0; background: transparent; cursor: pointer;
}
.hm-af .hm-af-channel-text {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 5px 17px; font-size: 1rem; line-height: 1.45;
  font-weight: 600; color: var(--hm-af-ink);
}
.hm-af .hm-af-channel input { display: block; align-self: center; justify-self: start; margin: 0; }
.hm-af .hm-af-pill {
  display: inline-block; font-size: 1rem; line-height: 1;
  padding: 6px 10px; background: var(--hm-af-orange); color: #fff;
  font-weight: 700; border-radius: 100px; white-space: nowrap;
}
.hm-af .hm-af-optin-note {
  font-size: 1rem; line-height: 1.5; color: var(--hm-af-ink); margin: 7px 0 11px;
}
.hm-af .hm-af-whatsapp-note {
  border-left: 3px solid var(--hm-af-green); background: #f1f8f4;
  padding: 10px 12px; margin: 0 0 14px;
  font-size: 1rem; border-radius: 0 9px 9px 0;
}
.hm-af .hm-af-whatsapp-note strong { display: block; color: var(--hm-af-green); margin: 0 0 4px; }
.hm-af .hm-af-whatsapp-note p { margin: 0; font-size: 1rem; color: var(--hm-af-ink); }
.hm-af .hm-af-privacy {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 1rem; line-height: 1.5;
  margin: 12px 0 15px; color: var(--hm-af-ink); cursor: pointer;
}
.hm-af .hm-af-privacy input { margin-top: 4px; }
.hm-af a { color: var(--hm-af-green); text-decoration: underline; text-underline-offset: 2px; }
/* Explicitly beat Elementor's generic button color in editor and frontend. */
.hm-af .hm-af-cta, .hm-af .hm-af-cta:focus {
  display: block; width: 100%; min-height: 48px;
  padding: 12px 15px;
  border: 0 !important; border-radius: 2rem !important;
  background: #005e52 !important; color: #fff !important;
  font-size: 1rem; font-weight: 700; line-height: 1.4;
  transition: background .15s;
}
.hm-af .hm-af-cta:hover, .hm-af .hm-af-cta:focus:hover {
  background: #00a075 !important; color: #fff !important;
}
.hm-af .hm-af-cta:disabled,
.hm-af .hm-af-cta:disabled:hover,
.hm-af .hm-af-cta:disabled:focus:hover {
  background: #9cb8b1 !important;
  color: #fff !important;
  cursor: not-allowed;
  opacity: 1;
}
.hm-af .hm-af-back {
  display: block; margin: 11px auto 0; padding: 7px 15px;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--hm-af-green); font-size: 1rem; font-weight: 600; cursor: pointer;
}
.hm-af .hm-af-back:hover { color: var(--hm-af-hover); }
.hm-af .hm-af-feedback {
  margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid #e8cbbd; border-radius: 9px;
  background: #fff4ee; color: #853b24; font-size: 1rem;
}
.hm-af .hm-af-feedback.hm-af-feedback-success { background: #f0f8f4; border-color: #c1dfd0; color: #215d47; }
.hm-af .hm-af-breed-list {
  position: absolute; z-index: 1000; left: 0; right: 0; top: 100%;
  max-height: 232px; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid #bacfc6;
  box-shadow: 0 8px 22px rgba(0,46,34,.18);
  border-radius: 0 0 10px 10px; scrollbar-width: auto;
}
.hm-af .hm-af-breed-option {
  display: block; width: 100%; padding: 11px 13px;
  border: 0; border-bottom: 1px solid #edf3ef;
  background: #fff; text-align: left;
  font-size: 1rem; color: var(--hm-af-ink);
}
.hm-af .hm-af-breed-option:hover, .hm-af .hm-af-breed-option[aria-selected="true"] { background: #eaf6f0; }
.hm-af .hm-af-breed-wrap small { display: block; color: var(--hm-af-ink); font-size: 1rem; margin-top: 5px; }
/* Responsive decisions based on the Elementor container width, not only viewport. */
@container (max-width: 520px) {
  .hm-af .hm-af-shell { border-radius: 16px; }
  .hm-af .hm-af-main { padding: 17px 14px 20px; }
  .hm-af .hm-af-two { grid-template-columns: 1fr; gap: 0; }
  .hm-af .hm-af-animal-choice { gap: 8px; min-height: 60px !important; }
  .hm-af .hm-af-animal-choice img { width: 38px; height: 38px; }
  .hm-af .hm-af-channel { column-gap: 14px; }
}
/* Viewport fallback for browsers lacking container query support. */
@supports not (container-type: inline-size) {
  @media (max-width: 520px) {
    .hm-af .hm-af-two { grid-template-columns: 1fr; gap: 0; }
    .hm-af .hm-af-main { padding: 17px 14px 20px; }
  }
}

/* Keep logo centred on phones, even when the Elementor column is narrow. */
@media (max-width: 767px) {
  .hm-af .hm-af-brand {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 12px 12px 13px;
  }
  .hm-af .hm-af-logo {
    width: 110px;
    flex: 0 0 auto;
    margin: 0 auto;
  }
  .hm-af .hm-af-brand-copy { width: 100%; flex: 0 1 auto; }
  .hm-af .hm-af-brand-title { font-size: 1.4rem; margin: 0 0 3px; }
}

/* 0.1.7: Viewport-specific branding; original 0.1.3 logo size on desktop/tablet. Elementor column widths never change the device breakpoints. */
@media screen and (min-width: 768px) {
  .hm-af .hm-af-brand {
    display: grid !important;
    grid-template-columns: 136px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: stretch !important;
    justify-content: start !important;
    gap: 16px !important;
    text-align: left !important;
    padding: 12px 18px !important;
  }
  .hm-af .hm-af-brand .hm-af-logo {
    width: 136px !important;
    max-width: 136px !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
    justify-self: start !important;
  }
  .hm-af .hm-af-brand .hm-af-brand-copy,
  .hm-af .hm-af-brand .hm-af-brand-copy * {
    text-align: left !important;
  }
  .hm-af .hm-af-brand .hm-af-brand-copy { width: auto !important; min-width: 0 !important; }
}
@media screen and (max-width: 767px) {
  .hm-af .hm-af-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    text-align: center !important;
  }
  .hm-af .hm-af-brand .hm-af-logo {
    width: 110px !important;
    height: auto !important;
    margin: 0 auto !important;
    flex: none !important;
  }
  .hm-af .hm-af-brand .hm-af-brand-copy,
  .hm-af .hm-af-brand .hm-af-brand-copy * { text-align: center !important; }
}
/* Always show the step-one continue button, even before an animal is selected.
   Never overlay the dog/cat choice: users must see and use those controls first. */
.hm-af [data-hm-step="1"] .hm-af-step-one-next {
  display: block !important;
  position: static;
  margin: 22px 0 0 !important;
}
.hm-af [data-hm-step="1"] .hm-af-animal-hint {
  margin: 8px 0 0;
  font-size: 0.9rem;
}
.hm-af .hm-af-progress { margin-bottom: 14px; }
.hm-af [data-hm-step="1"] h3 { margin-bottom: 12px; }
.hm-af [data-hm-step="1"] .hm-af-intro { margin-bottom: 12px; }
.hm-af [data-hm-step="1"] .hm-af-fieldset { margin-bottom: 8px; }
/* Compact just the first mobile step so its two animal choices and CTA appear sooner. */
@media screen and (max-width: 767px) {
  .hm-af .hm-af-brand { padding: 9px 12px 10px !important; }
  .hm-af .hm-af-brand .hm-af-logo { width: 100px !important; }
  .hm-af .hm-af-main { padding-top: 12px; }
  .hm-af .hm-af-progress { margin-bottom: 9px; }
  .hm-af [data-hm-step="1"] h3 { margin-bottom: 9px; }
  .hm-af [data-hm-step="1"] .hm-af-intro { padding: 9px 10px; margin-bottom: 8px; }
  .hm-af [data-hm-step="1"] .hm-af-intro strong { margin-bottom: 2px; }
  .hm-af [data-hm-step="1"] .hm-af-fieldset { margin-bottom: 6px; }
}

/* 0.1.7: Keep the step counter on one line on narrow smartphones.
   The title may wrap naturally; the counter may not wrap after "von". */
.hm-af .hm-af-progress-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  column-gap: 8px;
}
.hm-af .hm-af-progress-head strong {
  min-width: 0;
}
.hm-af .hm-af-progress-head [data-hm-progress-label] {
  white-space: nowrap !important;
  justify-self: end;
  text-align: right;
  flex: none;
}
@media screen and (max-width: 767px) {
  .hm-af .hm-af-progress-head strong {
    font-size: .95rem;
    line-height: 1.35;
  }
  .hm-af .hm-af-progress-head [data-hm-progress-label] {
    font-size: .875rem;
    line-height: 1.45;
  }
}

/* 0.1.7: Keep the first-step CTA visible also in the Elementor editing preview.
   The shortcode emits this button as real markup, not via JavaScript. */
.hm-af [data-hm-step="1"]:not([hidden]) [data-hm-first-next],
.elementor-editor-active .hm-af [data-hm-step="1"]:not([hidden]) [data-hm-first-next],
.elementor-edit-area-active .hm-af [data-hm-step="1"]:not([hidden]) [data-hm-first-next] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-height: 48px;
  margin-top: 22px !important;
  position: static !important;
  pointer-events: auto !important;
}

/* Trapped fields are not part of the customer form flow. */
.hm-af .hm-af-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; pointer-events: none !important; }

/* Persistent in-form success: same behavior as HM Tierfreunde 1.0.6. */
.hm-af .hm-af-confirmation { padding:25px 12px 36px; text-align:center; }
.hm-af .hm-af-confirmation-check {
 display:inline-flex; align-items:center; justify-content:center; width:64px; height:64px;
 border-radius:50%; border:2px solid #00a075; background:#edf7f2; color:#00a075;
 font-size:2.2rem; font-weight:400; margin:0 auto 22px;
}
.hm-af .hm-af-confirmation h3 {
 margin:0 auto 18px!important; max-width:660px; color:#00a075!important;
 font-family:'Bricolage Grotesque',Arial,sans-serif!important; font-size:1.4rem!important;
 line-height:1.4!important; font-weight:700!important; text-align:center!important;
}
.hm-af .hm-af-confirmation h3:focus { outline:none; }
.hm-af .hm-af-confirmation p {
 margin:0 auto 13px!important; max-width:660px; color:#222!important; font-size:1rem!important;
 line-height:1.6!important; font-family:'Bricolage Grotesque',Arial,sans-serif!important;
 font-weight:400!important; overflow-wrap:break-word;
}
@container (max-width:520px) { .hm-af .hm-af-confirmation { padding:18px 5px 26px; } }


/* 2026-10: HM Tierfreunde 1.0.6 reference – accessible, isolated success dialog. */
.hm-af-result-popup, .hm-af-result-popup *, .hm-af-result-popup *::before, .hm-af-result-popup *::after { box-sizing:border-box; }
.hm-af-result-popup {
  position:fixed!important; inset:0!important; z-index:2147483000!important;
  display:flex!important; align-items:center!important; justify-content:center!important;
  padding:20px!important; background:rgba(13,40,34,.55)!important;
  font-family:'Bricolage Grotesque',Arial,sans-serif!important; color:#222!important;
  font-size:16px!important; line-height:1.5!important; isolation:isolate;
}
.hm-af-result-popup-card {
  width:min(100%,490px)!important; min-width:0!important; max-height:min(88vh,740px);
  overflow-y:auto; padding:clamp(24px,4vw,38px)!important;
  background:#fff!important; border:1px solid #d8e7dd!important;
  border-radius:23px!important; box-shadow:0 22px 70px rgba(0,34,24,.25)!important;
  text-align:center!important; outline:none!important;
}
.hm-af-result-popup-check {
  display:flex!important; align-items:center!important; justify-content:center!important;
  width:80px!important; height:80px!important; margin:0 auto 22px!important;
  color:#009d76!important; border-radius:50%!important; background:#e3f5ed!important;
}
.hm-af-result-popup-card h3 {
  font-family:inherit!important; color:#005e52!important; font-size:clamp(23px,4vw,28px)!important;
  line-height:1.24!important; font-weight:700!important; margin:0 0 18px!important;
  text-transform:none!important; letter-spacing:normal!important;
}
.hm-af-result-popup-card p {
  font-family:inherit!important; font-size:16px!important; line-height:1.56!important;
  font-weight:400!important; color:#33473c!important; margin:0 0 14px!important;
  text-transform:none!important; letter-spacing:normal!important; overflow-wrap:anywhere;
}
.hm-af-result-popup-close {
  display:block!important; width:100%!important; min-height:51px!important;
  margin:25px 0 0!important; padding:12px 20px!important;
  border:1px solid #005e52!important; border-radius:999px!important;
  background:#005e52!important; color:#fff!important;
  font-family:inherit!important; font-size:16px!important; font-weight:700!important;
  line-height:1.5!important; cursor:pointer!important; text-transform:none!important;
}
.hm-af-result-popup-close:hover { background:#00a075!important; border-color:#00a075!important; }
.hm-af-result-popup-close:focus-visible { outline:3px solid #8dd1bd!important; outline-offset:3px!important; }
@media (max-width:580px) {
  .hm-af-result-popup {padding:13px!important;}
  .hm-af-result-popup-card {border-radius:18px!important;}
}
