/* Appointment modal */
.appointment-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.appointment-modal-overlay.show {
  display: flex;
}

.appointment-modal-content {
  position: relative;
  background: #efeee7;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 620px;
  width: 90%;
  max-height: 88vh;
  overflow: visible;
  padding: 40px 30px;
  animation: slideIn 0.3s ease-out;
}

.appointment-modal-content-inline {
  margin: 0;
  max-width: none;
  width: 100%;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-height: none;
  overflow: visible;
  animation: none;
}

#appointmentInlineContainer .appointment-modal-step {
  padding-top: 0;
}

#appointmentInlineContainer .appointment-modal-step h2,
#appointmentInlineContainer .appointment-modal-step p {
  text-align: left;
}

.booking-shell {
  margin: 58px 60px 20px;
  padding: 38px 42px 34px;
  background: #f5f3ea;
  border: 1px solid rgba(143, 138, 104, 0.28);
}

.booking-intro {
  margin: 0 0 20px;
  font: 400 95%/1.8 "Merriweather", serif;
  color: #31547e;
  text-align: left;
}

#appointmentInlineContainer .appointment-modal-step h2 {
  margin: 0 0 18px 0;
  font-size: 128%;
  color: #31547e;
}

#appointmentInlineContainer .appointment-modal-step p {
  margin: 8px 0;
}

#appointmentInlineContainer .appointment-modal-buttons {
  max-width: 420px;
}

#appointmentInlineContainer .appointment-modal-actions {
  max-width: 460px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Back button */
.appointment-modal-back {
  position: absolute;
  top: 14px;
  left: 14px;
  background: none;
  border: none;
  padding: 4px;
  width: 28px;
  height: 28px;
  display: none; /* hidden by default, shown via JS */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #31547e;
  transition: color 0.2s;
  font-size: 0; /* hide any stray text */
}

.appointment-modal-back::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.appointment-modal-back:hover {
  color: #8f8a68;
}

.appointment-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #31547e;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.appointment-modal-close:hover {
  color: #8f8a68;
}

.appointment-modal-step {
  animation: fadeIn 0.3s ease-out;
  padding-top: 20px;
  padding-bottom: 18px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.appointment-modal-step h2 {
  font: 400 140%/1.4 "Merriweather", serif;
  color: #31547e;
  margin: 0 0 25px 0;
  text-align: center;
}

.appointment-modal-step p {
  font: 400 85%/1.8 "Merriweather", serif;
  color: #6e737a;
  margin: 10px 0;
  text-align: center;
}

.appointment-modal-subtitle {
  margin: 0 0 20px 0 !important;
  font-style: italic;
  color: #8f8a68;
}

.appointment-modal-text {
  margin: 15px 0 !important;
  color: #31547e;
}

.appointment-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.appointment-modal-form-group {
  margin-bottom: 20px;
}

.appointment-modal-form-group label {
  display: block;
  font: 400 85%/1.4 "Merriweather", serif;
  color: #31547e;
  margin-bottom: 8px;
  font-weight: bold;
}

.appointment-modal-error {
  margin: 6px 0 0 0;
  font: 400 78%/1.4 "Merriweather", serif;
  color: #b42318;
  text-align: left;
}

.appointment-custom-select {
  position: relative;
  width: 100%;
}

.appointment-custom-select-trigger {
  width: 100%;
  padding: 11px 40px 11px 12px;
  border: 1px solid rgba(143, 138, 104, 0.55);
  border-radius: 4px;
  background: #f8f6ee;
  color: #2a4668;
  font: 400 85%/1.4 "Merriweather", serif;
  text-align: left;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.appointment-custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8f8a68;
  border-bottom: 2px solid #8f8a68;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.2s;
}

.appointment-custom-select-trigger:hover {
  border-color: #8f8a68;
}

.appointment-custom-select.is-open .appointment-custom-select-trigger,
.appointment-custom-select-trigger:focus {
  outline: none;
  border-color: #31547e;
  box-shadow: 0 0 0 2px rgba(49, 84, 126, 0.12);
}

.appointment-custom-select.is-open .appointment-custom-select-trigger::after {
  transform: translateY(-35%) rotate(-135deg);
}

.appointment-custom-select-trigger[data-has-value="false"] .appointment-custom-select-text {
  color: #6f767f;
}

.appointment-custom-select-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(143, 138, 104, 0.4);
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: #f8f6ee;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  max-height: 220px;
  overflow-y: auto;
}

.appointment-custom-select.is-open .appointment-custom-select-menu {
  display: block;
}

.appointment-custom-select.is-open .appointment-custom-select-trigger {
  border-radius: 4px 4px 0 0;
}

.appointment-custom-select-option {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  margin: 2px 0;
  background: transparent;
  color: #2a4668;
  font: 400 85%/1.4 "Merriweather", serif;
  text-align: left;
}

.appointment-custom-select-option:hover,
.appointment-custom-select-option:focus {
  outline: none;
  background: #d8ceb1;
  color: #1f3550;
}

.appointment-custom-select-option.is-selected {
  background: #e3dbc4;
  color: #1f3550;
}

.appointment-modal-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(143, 138, 104, 0.55);
  border-radius: 4px;
  font: 400 85%/1.4 "Merriweather", serif;
  color: #31547e;
  background: #f8f6ee;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.appointment-modal-input:focus {
  outline: none;
  border-color: #31547e;
  box-shadow: 0 0 0 2px rgba(49, 84, 126, 0.12);
}

/* Modal buttons */
.appointment-modal-btn {
  padding: 10px 16px;
  border: 1px solid #8f8a68;
  background: transparent;
  color: #8f8a68;
  font: 400 71%/1.2 "Merriweather", serif;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
  text-transform: none;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  letter-spacing: 0.01em;
}

.appointment-modal-btn:hover {
  background: #8f8a68;
  color: #fff;
  border-color: #8f8a68;
}

/* Primary button variant */
.appointment-modal-btn-primary {
  background: transparent;
  color: #8f8a68;
  border-color: #8f8a68;
}

.appointment-modal-btn-primary:hover {
  background: #8f8a68;
  color: #fff;
  border-color: #8f8a68;
}

.appointment-modal-btn-secondary {
  background: transparent;
  color: #8f8a68;
  border-color: rgba(143, 138, 104, 0.4);
}

.appointment-modal-btn-secondary:hover {
  background: #efeee7;
  color: #31547e;
  border-color: #31547e;
}

.appointment-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

/* "Or call us" card */
.appointment-modal-call-card {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(143, 138, 104, 0.25);
  border-radius: 4px;
  background: #f7f6f1;
  text-align: center;
}

.appointment-modal-call-card-label {
  display: block;
  font: italic 400 72%/1.2 "Merriweather", serif;
  color: #8f8a68;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}

.appointment-modal-call-card-number {
  display: block;
  font: 400 92%/1.3 "Merriweather", serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: #31547e;
  text-decoration: none;
  letter-spacing: 0.02em;
  /* On desktop: not clickable, just informational */
  pointer-events: none;
}

/* Make phone number tappable on touch devices */
@media (hover: none) and (pointer: coarse) {
  .appointment-modal-call-card-number {
    pointer-events: auto;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media only screen and (max-width: 645px) {
  .appointment-modal-content {
    width: 95%;
    max-width: 500px;
    max-height: 88vh;
    overflow: visible;
    padding: 40px 20px;
    border-radius: 4px;
  }

  .appointment-modal-step {
    padding-top: 10px;
  }

  .appointment-modal-step h2 {
    font-size: 120%;
  }

  .appointment-modal-buttons {
    gap: 10px;
  }

  .booking-shell {
    margin: 28px 20px 12px;
    padding: 24px 16px 22px;
  }
}

/* Keep lawyer-page CTA buttons the same width */
main .left > a.btn,
main .left > #appointmentBtn.btn {
  display: block !important;
  min-width: 172px !important;
  width: 172px !important;
  max-width: 172px !important;
  white-space: nowrap !important;
}

/* Match button element rendering to link .btn */
main #appointmentBtn.btn {
  padding: 10px 15px 10px 16px;
  border: 2px solid rgba(143, 138, 104, 0.3);
  box-sizing: content-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  background: transparent;
  color: #8f8a68;
  text-align: left;
}

main #appointmentBtn.btn:hover {
  color: #fff;
  background: #8f8a68;
}

/* Kontakt page: match right-column button width */
main .right > #appointmentBtn.btn {
  display: block;
  min-width: 140px;
  width: 140px;
  max-width: 140px;
  white-space: nowrap;
  box-sizing: content-box;
}
