/* Global contact popup — aligned with contact page hero form */
.royal-contact-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.royal-contact-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.royal-contact-popup[hidden] {
  display: flex !important;
}

.royal-contact-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.royal-contact-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92vh, 640px);
  overflow: auto;
  border-radius: 20px;
  padding: 28px 24px 24px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
  border: 1px solid rgba(28, 200, 215, 0.22);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s ease;
}

.royal-contact-popup.is-open .royal-contact-popup__dialog {
  transform: translateY(0) scale(1);
}

.royal-contact-popup__close {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.royal-contact-popup__close:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(28, 200, 215, 0.35);
  color: #fff;
}

.royal-contact-popup__header {
  text-align: center;
  margin-bottom: 20px;
  padding-inline: 8px;
}

.royal-contact-popup__title {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.royal-contact-popup__subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(203, 213, 225, 0.92);
}

.royal-contact-popup__form .hero-modern-row {
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.royal-contact-popup__card {
  padding: 20px 18px 18px;
}

.royal-contact-popup__submit {
  width: 100%;
}

.royal-contact-popup__feedback {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.royal-contact-popup__feedback.is-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.royal-contact-popup__feedback.is-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.royal-contact-popup-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .royal-contact-popup__dialog {
    padding: 24px 16px 18px;
    border-radius: 16px;
  }

  .royal-contact-popup__close {
    top: 10px;
    left: 10px;
  }
}
