#apartment-preloader {
  font-size: 36px;
  text-align: center;
  padding: 2em;
  background-color: #fff;
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#apartment-selector {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1024px;
  margin: 50px auto;
  padding: 15px;
}

#apartment-form label {
  display: block;
  padding: 1em;
  margin-bottom: 0.5em;
  border: 2px solid #ccc;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-color: #fafafa;
  position: relative;
  padding-left: 3em;
}

#apartment-form input[type="radio"] {
  position: absolute;
  left: 1em;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2em;
  height: 1.2em;
  accent-color: #0073aa;
  /* WP-Blau */
}

#apartment-form label:hover {
  border-color: #0073aa;
  background-color: #f0f8ff;
}

#apartment-form input[type="radio"]:checked + span {
  font-weight: bold;
  color: #0073aa;
}

#search-hint {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

/*suchfeld*/
#apartment-search {
  width: 100%;
  max-width: 400px;
  margin-bottom: 1em;
  /* Optional, maximale Breite */
  padding: 12px 40px 12px 16px;
  /* Rechts genug Platz für Icon */
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%22122.879px%22%20height%3D%22119.799px%22%20viewBox%3D%220%200%20122.879%20119.799%22%20enable-background%3D%22new%200%200%20122.879%20119.799%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cpath%20d%3D%22M49.988%2C0h0.016v0.007C63.803%2C0.011%2C76.298%2C5.608%2C85.34%2C14.652c9.027%2C9.031%2C14.619%2C21.515%2C14.628%2C35.303h0.007v0.033v0.04%20h-0.007c-0.005%2C5.557-0.917%2C10.905-2.594%2C15.892c-0.281%2C0.837-0.575%2C1.641-0.877%2C2.409v0.007c-1.446%2C3.66-3.315%2C7.12-5.547%2C10.307%20l29.082%2C26.139l0.018%2C0.016l0.157%2C0.146l0.011%2C0.011c1.642%2C1.563%2C2.536%2C3.656%2C2.649%2C5.78c0.11%2C2.1-0.543%2C4.248-1.979%2C5.971%20l-0.011%2C0.016l-0.175%2C0.203l-0.035%2C0.035l-0.146%2C0.16l-0.016%2C0.021c-1.565%2C1.642-3.654%2C2.534-5.78%2C2.646%20c-2.097%2C0.111-4.247-0.54-5.971-1.978l-0.015-0.011l-0.204-0.175l-0.029-0.024L78.761%2C90.865c-0.88%2C0.62-1.778%2C1.209-2.687%2C1.765%20c-1.233%2C0.755-2.51%2C1.466-3.813%2C2.115c-6.699%2C3.342-14.269%2C5.222-22.272%2C5.222v0.007h-0.016v-0.007%20c-13.799-0.004-26.296-5.601-35.338-14.645C5.605%2C76.291%2C0.016%2C63.805%2C0.007%2C50.021H0v-0.033v-0.016h0.007%20c0.004-13.799%2C5.601-26.296%2C14.645-35.338C23.683%2C5.608%2C36.167%2C0.016%2C49.955%2C0.007V0H49.988L49.988%2C0z%20M50.004%2C11.21v0.007h-0.016%20h-0.033V11.21c-10.686%2C0.007-20.372%2C4.35-27.384%2C11.359C15.56%2C29.578%2C11.213%2C39.274%2C11.21%2C49.973h0.007v0.016v0.033H11.21%20c0.007%2C10.686%2C4.347%2C20.367%2C11.359%2C27.381c7.009%2C7.012%2C16.705%2C11.359%2C27.403%2C11.361v-0.007h0.016h0.033v0.007%20c10.686-0.007%2C20.368-4.348%2C27.382-11.359c7.011-7.009%2C11.358-16.702%2C11.36-27.4h-0.006v-0.016v-0.033h0.006%20c-0.006-10.686-4.35-20.372-11.358-27.384C70.396%2C15.56%2C60.703%2C11.213%2C50.004%2C11.21L50.004%2C11.21z%22/%3E%3C/g%3E%3C/svg%3E");
}

#apartment-search:focus:not([disabled]) {
  border-color: #0073aa;
  box-shadow: 0 0 8px rgba(0, 115, 170, 0.6);
}

#apartment-search:not([disabled]) {
  border-color: #000; /* schwarz */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

input[readonly][name="billing_apartment"] {
  background-color: #f9f9f9 !important;
  border: 1px solid #ccc !important;
  color: #333 !important;
  cursor: default !important;
  box-shadow: none !important;
}

/*Waiting msg start*/
.waiting-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background-color: rgba(240, 248, 255, 0.95);
  border: 1px solid #2196f3;
  border-radius: 6px;
  padding: 15px 25px;
  color: #0d47a1;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: sans-serif;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 9999;
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
  user-select: none;
}

/* Overlay: optional, wenn du den Hintergrund abdunkeln willst */
.waiting-message::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1; /* hinter der Nachricht */
  border-radius: 6px;
}

.waiting-message span.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #0d47a1;
  border-radius: 50%;
  opacity: 0.3;
  animation-name: blink;
  animation-duration: 1.4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.waiting-message span.dot:nth-child(1) {
  animation-delay: 0s;
}
.waiting-message span.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.waiting-message span.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

/*Waiting msg end*/

.sticky-submit {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
  padding: 1rem 2rem;
  background-color: #0073aa;
  color: var(--color-white);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sticky-submit:hover {
  background-color: var(--color-dark);
}

/*collappse fieldset start*/
fieldset {
  padding: 0.35em 0.75em 0.625em;
  margin: 24px 0;
}
/* Pfeil + klickbar machen */
fieldset.collapsible > legend {
  position: relative;
  padding-left: 30px; /* Platz für den SVG-Pfeil */
  font-family: "Anton";
  font-size: 20px;
  cursor: pointer;
}

fieldset.collapsible > legend::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polygon points="8,5 16,12 8,19"/></svg>');
}

fieldset.collapsible.active > legend::before {
  transform: translateY(-50%) rotate(90deg);
}

/* Inhalt einklappen */
.collapsible-content {
  display: none;
}

/* Inhalt sichtbar wenn aktiv */
.collapsible.active .collapsible-content {
  display: block;
}

/*collapse fieldset end*/
/*
#apartment-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
*/

@media (max-width: 768px) {
  #apartment-search {
    max-width: none;
    position: sticky;
    top: 10px;
    z-index: 1;
  }
  #apartment-search:disabled {
    opacity: 1;
    background-color: #f3f3f3;
  }
  #apartment-search::placeholder {
    font-size: 13px;
  }
}
