
/* Einheitliches Kontaktformular – Echte Momente (DU) */
[data-open-contact] { font: inherit; }

.em-contact-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(212, 175, 55, .28);
  border-radius: 18px;
  background: #f6f1e8;
  color: #171717;
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  overflow: auto;
  font-family: inherit;
}
.em-contact-dialog::backdrop {
  background: rgba(11,11,11,.76);
  backdrop-filter: blur(4px);
}
.em-contact-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 30px 36px 24px;
  border-bottom: 1px solid rgba(23,23,23,.12);
}
.em-contact-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #9a781c;
  font-size: 11px;
  font-weight: 800;
}
.em-contact-label span {
  width: 18px;
  height: 2px;
  background: #d4af37;
}
.em-contact-head h2 {
  margin: 0;
  color: #171717;
  font-size: clamp(30px,3.3vw,40px);
  line-height: 1.08;
  letter-spacing: -1.5px;
}
.em-contact-close,
.em-privacy-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23,23,23,.16);
  border-radius: 50%;
  background: #fff;
  color: #171717;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.em-contact-close:hover,
.em-contact-close:focus-visible,
.em-privacy-close:hover,
.em-privacy-close:focus-visible {
  border-color: #d4af37;
  color: #9a781c;
}
.em-contact-direct { display: grid; gap: 10px; padding: 0 0 2px; }
.em-contact-direct h3 { margin: 0; color: #171717; font-size: 20px; line-height: 1.2; }
.em-contact-direct > p { margin: 0; color: #6f6a60; font-size: 12px; line-height: 1.55; }
.em-contact-direct-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 16px; padding: 14px 16px; border: 1px solid rgba(212,175,55,.35); border-radius: 9px; background: rgba(255,255,255,.42); }
.em-contact-direct-card strong { color: #171717; font-size: 13px; overflow-wrap: anywhere; }
.em-contact-direct-copy { min-height: 38px; padding: 0 14px; border: 1px solid #d4af37; border-radius: 7px; background: transparent; color: #806315; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.em-contact-direct-copy:hover, .em-contact-direct-copy:focus-visible { background: #171717; color: #d4af37; }
.em-contact-direct-feedback { grid-column: 1 / -1; min-height: 0; color: #6f6a60; font-size: 10px; }

.em-contact-form {
  display: grid;
  gap: 16px;
  margin: 0 !important;
  padding: 26px 36px 30px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.em-contact-form[hidden] { display: none !important; }
.em-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.em-contact-form label:not(.em-contact-consent) {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #171717;
}
.em-contact-field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #171717;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}
.em-contact-field-label > span {
  color: #9a781c;
  font-weight: 800;
}
.em-contact-form input[type="text"],
.em-contact-form input[type="email"],
.em-contact-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(23,23,23,.18);
  border-radius: 9px;
  background: #fff;
  color: #171717;
  font: 14px/1.45 inherit;
}
.em-contact-form input[type="text"],
.em-contact-form input[type="email"] {
  min-height: 46px;
}
.em-contact-form textarea {
  min-height: 145px;
  resize: vertical;
}
.em-contact-form input:focus,
.em-contact-form textarea:focus {
  border-color: #d4af37;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}
.em-contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(23,23,23,.11);
  border-radius: 9px;
  background: rgba(255,255,255,.45);
  color: #5b574f;
  font-size: 11px;
  line-height: 1.5;
}
.em-contact-consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #d4af37;
}
.em-contact-consent a,
.em-privacy-foot a {
  color: #806315;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.em-contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.em-contact-submit,
.em-contact-success-close,
.em-privacy-back {
  min-height: 50px;
  border: 0;
  border-radius: 9px;
  background: #171717;
  color: #f6f1e8;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.em-contact-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
.em-contact-submit:hover,
.em-contact-submit:focus-visible,
.em-contact-success-close:hover,
.em-contact-success-close:focus-visible,
.em-privacy-back:hover,
.em-privacy-back:focus-visible {
  background: #2b2b2b;
  color: #d4af37;
}
.em-contact-submit:disabled {
  opacity: .7;
  cursor: wait;
}
.em-contact-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #8ebc9c;
  border-radius: 7px;
  background: #edf8f0;
  color: #245c34;
  font-size: 12px;
  line-height: 1.5;
}
.em-contact-status--error {
  border-color: #d8a19b;
  background: #fff1ef;
  color: #8a2920;
}
.em-contact-hint {
  margin: -4px 0 0;
  color: #6f6a60;
  font-size: 10px;
  line-height: 1.45;
}

.em-contact-dialog--success {
  width: min(590px, calc(100% - 32px));
}
.em-contact-dialog--success .em-contact-head {
  min-height: 68px;
  justify-content: flex-end;
  padding: 15px 18px 0;
  border-bottom: 0;
}
.em-contact-dialog--success .em-contact-head > div { display: none; }
.em-contact-dialog--success .em-contact-form { display: none !important; }
.em-contact-success[hidden] { display: none !important; }
.em-contact-success {
  padding: 2px 52px 46px;
  text-align: center;
}
.em-contact-success-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 21px;
  border-radius: 50%;
  background: rgba(212,175,55,.16);
  color: #9a781c;
  font-size: 34px;
  font-weight: 800;
}
.em-contact-success .em-contact-label {
  justify-content: center;
  margin-bottom: 10px;
}
.em-contact-success h3 {
  margin: 0;
  color: #171717;
  font-size: clamp(32px,4vw,42px);
  line-height: 1.08;
}
.em-contact-success-message {
  margin: 17px auto 0;
  max-width: 430px;
  color: #171717;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}
.em-contact-success-note {
  margin: 9px auto 25px;
  max-width: 430px;
  color: #6f6a60;
  font-size: 13px;
  line-height: 1.6;
}
.em-contact-success-close {
  min-width: 210px;
  padding: 0 20px;
}

.em-privacy-info[hidden] { display: none !important; }
.em-privacy-info {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(11,11,11,.58);
  backdrop-filter: blur(2px);
}
.em-privacy-panel {
  width: min(650px,100%);
  max-height: min(720px,calc(100dvh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,.24);
  border-radius: 16px;
  background: #f6f1e8;
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  text-align: left;
}
.em-privacy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  padding: 27px 30px 21px;
  border-bottom: 1px solid rgba(23,23,23,.12);
}
.em-privacy-head .em-contact-label { margin-bottom: 8px; }
.em-privacy-head h3 {
  margin: 0;
  max-width: 500px;
  color: #171717;
  font-size: clamp(24px,3vw,30px);
  line-height: 1.12;
}
.em-privacy-content {
  overflow: auto;
  padding: 23px 30px;
  color: #504c45;
  font-size: 13px;
  line-height: 1.7;
}
.em-privacy-content p {
  margin: 0 0 14px;
}
.em-privacy-content p:last-child { margin-bottom: 0; }
.em-privacy-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 30px 21px;
  border-top: 1px solid rgba(23,23,23,.12);
}
.em-privacy-back {
  min-height: 42px;
  padding: 0 16px;
}
.em-privacy-foot a {
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .em-contact-head { padding: 26px 24px 20px; }
  .em-contact-form { padding: 22px 24px 26px !important; }
  .em-contact-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
@media (max-width: 620px) {
  .em-contact-direct-card { grid-template-columns: 1fr; }
  .em-contact-direct-copy { width: 100%; }
  .em-contact-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
  }
  .em-contact-success { padding: 0 24px 34px; }
  .em-privacy-info { padding: 10px; }
  .em-privacy-head { padding: 22px 20px 18px; }
  .em-privacy-content { padding: 20px; }
  .em-privacy-foot {
    align-items: stretch;
    flex-direction: column;
    padding: 16px 20px 20px;
  }
  .em-privacy-back { width: 100%; }
  .em-privacy-foot a { text-align: center; }
}


/* Höhenabhängige Kontaktformular-Anpassung: auf normalen Desktop-Höhen ohne internen Scrollbalken */
@media (min-width: 621px) and (max-height: 920px) {
  .em-contact-dialog { max-height: calc(100dvh - 24px); overflow: hidden; }
  .em-contact-head { padding: 20px 30px 16px; }
  .em-contact-head h2 { font-size: clamp(28px, 3vw, 36px); }
  .em-contact-form { gap: 10px; padding: 16px 30px 18px !important; }
  .em-contact-direct { gap: 6px; }
  .em-contact-direct h3 { font-size: 17px; }
  .em-contact-direct > p { font-size: 11px; line-height: 1.4; }
  .em-contact-direct-card { padding: 9px 12px; gap: 8px 12px; }
  .em-contact-direct-copy { min-height: 34px; }
  .em-contact-form label:not(.em-contact-consent) { gap: 5px; }
  .em-contact-form input[type="text"], .em-contact-form input[type="email"], .em-contact-form textarea { padding: 9px 12px; }
  .em-contact-form input[type="text"], .em-contact-form input[type="email"] { min-height: 40px; }
  .em-contact-form textarea { min-height: 96px; height: 96px; }
  .em-contact-consent { padding: 8px 10px; font-size: 10px; line-height: 1.4; }
  .em-contact-submit { min-height: 44px; }
  .em-contact-hint { margin-top: -3px; font-size: 9px; }
}
@media (min-width: 621px) and (max-height: 760px) {
  .em-contact-dialog { overflow: auto; }
  .em-contact-head { padding: 15px 26px 12px; }
  .em-contact-head h2 { font-size: 30px; }
  .em-contact-form { gap: 8px; padding: 12px 26px 14px !important; }
  .em-contact-direct > p { display: none; }
  .em-contact-direct-card { padding: 7px 10px; }
  .em-contact-form textarea { min-height: 76px; height: 76px; }
  .em-contact-consent { padding: 6px 9px; }
  .em-contact-submit { min-height: 40px; }
}

