/* MODAL WINDOW */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  /* make the modal itself the scroll area in case dialog grows beyond viewport */
  overflow: auto;
  overscroll-behavior: contain; /* keep body from peeking through on Android */
}
.modal.is-open {
  display: block;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.modal__dialog {
  position: relative;
  max-width: 880px;
  width: calc(100% - 2rem);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
}
.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 40px !important;
  line-height: 1 !important;
  cursor: pointer;
}
.modal__title {
  margin: 0 0 12px;
}
body.modal-open {
  overflow: hidden;
}

.cf7-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cf7-grid--full {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .cf7-grid {
    grid-template-columns: 1fr;
  }
}

/* Akkordeon */
.ha-acc {
  border-top: 2px solid #dde4e7;
  background: #fff;
}
.ha-acc__btn {
  width: 100%;
  text-align: left;
  padding: 18px 10px;
  background: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #002752;
}

.ha-acc__btn:hover {
  cursor: pointer;
}

.ha-acc__btn span {
  font-family: 'FrutigerMedium' !important;
  font-weight: bold;
  letter-spacing: 0.25px;
}

.ha-acc[data-open='true'] .ha-acc__chev {
  transform: rotate(180deg);
}
.ha-acc__panel {
  max-height: 1000vh;
  transition: max-height 0.25s ease;
}
.ha-acc[data-open='false'] .ha-acc__panel {
  max-height: 0;
  overflow: hidden;
}

.ha-acc__btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Versicherer-Liste */
.ins-list__loading {
  padding: 18px;
}
.ins-list__error {
  padding: 18px;
  color: #b42318;
}
.ins-list__ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.ins-logo-only {
  display: flex;
  align-items: center;
  /* position: relative; */
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
  padding: 25px 0px;
  cursor: pointer;
}

/* Ensure the label (logo) doesn’t overlay the radio */
.ins-logo-only__label {
  position: static !important; /* no absolute overlay */
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.ins-logo-only__img {
  object-fit: contain;
  display: block;
  background: #fff;
  max-width: 200px;
  max-height: 100px;
  width: auto;
  height: auto;
}

.ins-logo-only input[type='radio'],
.ins-models__item input[type='radio'] {
  position: static !important; /* not absolute/left:-9999px */
  left: auto !important;
  opacity: 1 !important; /* not visually hidden */
  visibility: visible !important;
  width: 22px;
  height: 22px; /* make it easy to hit */
  margin: 0 25px 0 12px;
  appearance: auto !important; /* show native radio */
  -webkit-appearance: radio !important;
  -moz-appearance: radio !important;
  flex: 0 0 auto;
  accent-color: #0b3569; /* optional brand color */
  cursor: pointer;
}
/* .ins-logo-only:has(input[type='radio']:checked) {
  border-color: #2e5b9a;
  box-shadow: 0 0 0 3px rgba(46, 91, 154, 0.15);
} */

/* Modelle */
.ins-models__title {
  display: none;
  margin: 16px 0 8px;
  font: 600 20px/1.2 system-ui, Arial;
  color: #0b2239;
}
.ins-models__ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
}
.ins-models__item {
  background: rgb(250, 250, 251);
  padding: 20px 0px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.ins-models__item > label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ins-models__item:hover {
  background: #f9f9f9;
}

.ins-models__name {
  font-family: 'FrutigerLight' !important;
  letter-spacing: 0.25px;
  padding-left: 15px;
  margin-top: 2px;
}

.ins-models__meta {
  color: #425466;
  font-size: 14px;
}

/* Result */
.ha-result {
  padding: 60px 25px;
  display: flex;
}
.ha-result--ok {
  background: #eef8f0;
  border: 1px solid #c7e6cf;
}
.ha-result--bad {
  background: #f7eaea;
  border: 1px solid #e7c7c7;
}
.ha-actions {
  margin: 3rem auto 2rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
}
.btn--primary {
  background: #a9aa7b;
  color: #fff;
  text-transform: uppercase;
  font-family: FrutigerMedium !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px;
  padding: 15px 30px;
  transition: 0.2s ease;
}

.btn--primary:hover {
  background-color: #002752;
}

.ha-acc__chev::after {
  content: '';
  display: block;
  width: 16px;
  height: 9px;
  background-image: url(/wp-content/uploads/hausarztmodell-chevron-down.svg);
  background-repeat: no-repeat;
  background-size: contain;
}

.ins-models__result {
  font-family: 'FrutigerLight';
  letter-spacing: 0.25px;
}

/* COLORS */

.ha-result--no-alt-modell,
.ha-result--list-modell,
.ha-result--another-alt-modell {
  background-color: rgb(238 223 220);
}

.ha-result--insured {
  background-color: rgb(239 241 239);
}

.ha-result__txt,
.ha-result__txt p,
.ha-result__txt p a,
.ins-list__loading,
.ins-list__error {
  font-family: 'FrutigerMedium';
}

.ha-result__txt p a {
  text-decoration: underline;
}

.ha-result__media img {
  border-radius: 100%;
  max-width: 150px;
  margin-top: -30px;
}

@media (min-width: 769px) {
  .ins-logo-only__img {
    width: 200px;
  }

  .ha-acc__btn span {
    font-size: 24px;
    line-height: 32px;
  }

  .ins-models__name {
    font-size: 24px;
  }

  .ha-result__txt {
    padding-right: 4rem;
  }

  .modal__dialog {
    margin: 18vh auto;
    padding: 30px 30px 30px;
  }
}

@media (max-width: 768px) {
  .ins-logo-only__img {
    width: 150px;
  }

  .ha-acc__btn span {
    font-size: 20px;
    line-height: 26px;
  }

  .ins-models__name {
    font-size: 20px;
  }

  .ha-result {
    flex-wrap: wrap;
    flex-direction: column-reverse;
  }

  .ha-result__txt {
    margin-top: 2rem;
  }

  .modal__dialog {
    margin: 15px auto;
    padding: 40px 20px;
  }
}

.ha-back {
  display: block;
  margin-bottom: 1rem;
  padding-bottom: 10px;
  text-transform: uppercase;
  font-family: FrutigerMedium;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1.5px;
  border-bottom: 1px solid #002752;
  transition: opacity 0.15s ease;
  &::before {
    content: '';
    display: inline-block;
    transform: rotate(90deg);
    width: 16px;
    height: 9px;
    margin-right: 8px;
    margin-bottom: 1px;
    background-image: url(/wp-content/uploads/hausarztmodell-chevron-down.svg);
    background-repeat: no-repeat;
    background-size: contain;
  }

  &:hover {
    opacity: 0.5;
  }
}
