/* Overlay für Contact, Impressum, Datenschutz — benötigt von chat.js */

#overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 12, 18, 0.92);
  backdrop-filter: blur(20px);
  z-index: 150;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 60px 24px 24px;
}

#overlay.visible { display: flex; }

.overlay-wrapper {
  position: relative;
  max-width: 560px;
  width: 100%;
}

.overlay-wrapper:has(.overlay-content--team) {
  max-width: 1000px;
}

#overlay-content {
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 48px 40px;
  color: rgba(215, 185, 155, 0.92);
  line-height: 1.75;
  background: var(--bg-elevated);
  border-radius: 16px;
  border: 1px solid rgba(110, 145, 180, 0.1);
}

#overlay-content.overlay-content--team {
  max-width: none;
}

#overlay-content h2 {
  font-size: 22px;
  font-weight: 500;
  color: rgba(225, 185, 145, 0.95);
  margin-bottom: 28px;
}

#overlay-content h3 {
  font-size: 15px;
  font-weight: 500;
  color: rgba(225, 185, 145, 0.85);
  margin-top: 24px;
  margin-bottom: 8px;
}

#overlay-content h4 {
  font-size: 14px;
  font-weight: 500;
  color: rgba(225, 185, 145, 0.75);
  margin-top: 16px;
  margin-bottom: 6px;
}

#overlay-content p {
  font-size: 14px;
  margin-bottom: 14px;
  color: rgba(215, 185, 155, 0.78);
}

#overlay-content ul {
  font-size: 14px;
  margin-bottom: 14px;
  padding-left: 24px;
  color: rgba(215, 185, 155, 0.78);
}

#overlay-content li { margin-bottom: 4px; }

#overlay-content a {
  color: rgba(110, 145, 180, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

#overlay-content a:hover {
  color: rgba(160, 185, 215, 0.9);
}

#overlay-close, .overlay-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  background: rgba(30, 25, 20, 0.85);
  border: 1px solid rgba(170, 125, 85, 0.3);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  color: rgba(215, 185, 155, 0.8);
  font-size: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

#overlay-close.visible, .overlay-close-btn.visible { display: flex; }

#overlay-close:hover, .overlay-close-btn:hover {
  color: rgba(225, 185, 145, 1);
  background: rgba(50, 40, 35, 0.95);
  border-color: rgba(170, 125, 85, 0.5);
}

/* Contact dialog */
.contact-dialog { max-width: 420px; margin: 0 auto; }

.contact-dialog .contact-question {
  font-size: 18px;
  color: rgba(225, 185, 145, 0.95);
  font-weight: 400;
  margin-bottom: 24px;
  line-height: 1.6;
}

.contact-dialog .contact-input-wrap {
  background: rgba(170, 125, 85, 0.06);
  border: 1px solid rgba(170, 125, 85, 0.18);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.contact-dialog .contact-input-wrap:focus-within {
  border-color: rgba(170, 125, 85, 0.4);
}

.contact-dialog input[type="text"],
.contact-dialog input[type="email"],
.contact-dialog input[type="tel"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(225, 185, 145, 0.9);
  font-size: 15px;
  font-family: inherit;
}

.contact-dialog .contact-send {
  background: rgba(170, 125, 85, 0.2);
  border: 1px solid rgba(170, 125, 85, 0.35);
  border-radius: 10px;
  color: rgba(225, 185, 145, 0.95);
  padding: 12px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s;
}

.contact-dialog .contact-send:hover {
  background: rgba(170, 125, 85, 0.35);
}

.contact-reply { margin-bottom: 24px; color: rgba(215, 185, 155, 0.9); }
.contact-success { text-align: center; padding: 24px 0; }
.contact-success .checkmark {
  font-size: 32px;
  color: rgba(110, 180, 140, 0.9);
  margin-bottom: 16px;
}

/* Team grid in overlay */
.team-section-grid, .team-overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.team-section-card {
  background: rgba(110, 145, 180, 0.06);
  border: 1px solid rgba(110, 145, 180, 0.12);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.team-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.team-name { font-size: 15px; font-weight: 500; color: var(--text-headline); margin-bottom: 4px; }
.team-role { font-size: 12px; color: var(--text-muted); }
.team-more-btn {
  margin-top: 12px;
  background: none;
  border: 1px solid rgba(110, 145, 180, 0.2);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.team-more-btn:hover { border-color: rgba(110, 145, 180, 0.4); color: var(--text-body); }
