/* ── Overlay ── */
:root {
  --modal-overlay: rgba(6, 18, 34, 0.6);
}

.rp-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--modal-overlay);
  z-index: 10000;
  padding: 20px;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rp-modal.open {
  display: flex;
}

/* ── Panel ── */
.rp-modal__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  height: auto;
  overflow-y: auto;
  border-radius: 14px;
  padding: 36px 34px 28px;
  background-color: var(--seconday-col);
  background-image:
    linear-gradient(135deg, rgba(195, 138, 110, 0.07) 0%, transparent 52%),
    radial-gradient(
      ellipse at 82% 18%,
      rgba(195, 138, 110, 0.06) 0%,
      transparent 58%
    );
  border: 1px solid rgba(195, 138, 110, 0.18);
  box-shadow:
    0 36px 88px rgba(0, 0, 0, 0.58),
    0 4px 18px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: inherit;
  z-index: 10001;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: thin;
  scrollbar-color: rgba(195, 138, 110, 0.3) transparent;
}

.rp-modal__panel::-webkit-scrollbar {
  width: 4px;
}
.rp-modal__panel::-webkit-scrollbar-track {
  background: transparent;
}
.rp-modal__panel::-webkit-scrollbar-thumb {
  background: rgba(195, 138, 110, 0.3);
  border-radius: 4px;
}

/* ── Close button ── */
.rp-modal__close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.38);
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.18s;
  z-index: 2;
}
.rp-modal__close:hover {
  color: var(--primary-col);
}

/* ── FAB contact buttons — in-flow row below submit ── */
.modal-fab-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(195, 138, 110, 0.13);
}

.modal-fab {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  outline: none;
}
.modal-call    { background: rgba(0, 123, 255, 0.88); }
.modal-whatsapp { background: #fff; }

.modal-fab:hover,
.modal-fab:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

.modal-fab svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 20px;
  max-height: 20px;
  display: block;
}

.modal-fab img {
  width: 22px;
  height: 22px;
  display: block;
}

/* ── Heading ── */
.rp-modal__panel h3 {
  color: var(--primary-col);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.07em;
  text-align: center;
  padding: 0;
  margin-top: 8px;
  margin-bottom: 0;
}

.rp-modal__panel h3::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--primary-col);
  margin: 8px auto 0;
  border-radius: 2px;
  opacity: 0.45;
}

/* ── Subtext ── */
.rp-modal__panel p {
  font-size: 12px;
  color: rgba(161, 157, 148, 0.7);
  padding: 0;
  line-height: 1.6;
  margin-top: 10px;
  margin-bottom: 22px;
  text-align: center;
}

/* ── Form font inherit ── */
.rp-modal input,
.rp-modal button {
  font-family: inherit;
}

/* ── Text inputs — underline style ── */
#rp-modal-form input[type="text"],
#rp-modal-form input[type="email"],
#rp-modal-form input[type="tel"],
#rp-modal-form input[name="message"] {
  display: block;
  width: 100%;
  border: none !important;
  border-bottom: 1px solid rgba(195, 138, 110, 0.28) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 9px 0 !important;
  margin-bottom: 18px !important;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88) !important;
  transition: border-color 0.2s;
  box-shadow: none !important;
}

#rp-modal-form input[type="text"]::placeholder,
#rp-modal-form input[type="email"]::placeholder,
#rp-modal-form input[type="tel"]::placeholder,
#rp-modal-form input[name="message"]::placeholder {
  color: rgba(195, 138, 110, 0.42);
  font-size: 13px;
}

#rp-modal-form input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-bottom-color: var(--primary-col) !important;
}

/* ── CTA ── */
.rp-modal__cta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#rp-modal-visit {
  width: 100%;
  padding: 13px 20px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: var(--primary-col);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    opacity 0.2s,
    transform 0.15s;
}
#rp-modal-visit:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

/* ── CAPTCHA ── */
.form-con .g-recaptcha {
  transform: scale(0.81);
  transform-origin: left top;
}

/* ── Form container ── */
.modal-content-con > .form-con {
  flex: 1;
  max-width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.modal-content-con .form-con input {
  width: 100%;
  box-sizing: border-box;
}

/* ── Responsive: large tablets / small laptops ── */
@media (max-width: 1200px) {
  .rp-modal__panel {
    max-width: 500px;
    width: 92%;
    padding: 30px 28px 24px;
  }
  .form-con .g-recaptcha {
    transform: scale(0.81);
    transform-origin: left top;
  }
}

/* ── Responsive: tablets ── */
@media (max-width: 900px) {
  .rp-modal__panel {
    max-width: 92%;
    padding: 28px 24px 22px;
  }
  .form-con .g-recaptcha {
    transform: scale(0.81);
    transform-origin: left top;
  }
}

/* ── Responsive: phones ── */
@media (max-width: 520px) {
  .rp-modal {
    padding: 12px;
  }

  .rp-modal__panel {
    width: 100%;
    max-width: 100%;
    padding: 26px 20px 20px;
    border-radius: 14px;
    margin: 0;
  }

  #rp-modal-visit {
    width: 100%;
    padding: 13px;
    border-radius: 8px;
  }

  .form-con .g-recaptcha {
    transform: scale(0.81);
    transform-origin: left top;
  }
}

/* ── Responsive: very small phones ── */
@media (max-width: 375px) {
  .rp-modal__panel {
    padding: 24px 16px 18px;
    border-radius: 12px;
  }

  .rp-modal__panel h3 {
    font-size: 1.05rem;
  }

  .modal-content-con .form-con input {
    padding: 8px 0;
  }

  .form-con .g-recaptcha {
    transform: scale(0.86);
    transform-origin: left top;
  }

  .modal-fab {
    width: 36px;
    height: 36px;
  }

  .modal-fab svg {
    width: 16px;
    height: 16px;
    max-width: 18px;
    max-height: 18px;
  }

  .modal-fab img {
    width: 20px;
    height: 20px;
  }
}
