/* Modal basic styles */
: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(4px);
  --webkit-backdrop-filter: blur(4px);
}

.rp-modal.open {
  display: flex;
}

.rp-modal__panel {
  position: relative;
  width: 98%;
  max-width: 600px;
  max-height: 60vh;
  height: auto;
  border-radius: 8px;
  padding: 20px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  font-family: inherit;
  z-index: 10001;
  background-color: hsl(0, 0%, 100%);
  background-image:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.11) 1px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 2px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.02)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.02) 0 2px,
      transparent 2px 10px
    );
  /* background-size: 12px 12px, 8px 8px; */

  /* sizes: first = dot spacing, second fills, third = faint diagonal lines */
  background-size:
    14px 14px,
    100% 100%,
    10px 10px;
  background-blend-mode: overlay, normal, overlay;
  padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Floating action container inside modal (bottom-right) */
.modal-fab-container {
  position: absolute;
  right: 20px;
  bottom: 65px;
  flex-direction: column;
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
  margin-top: 10px;
}

.modal-logo img {
  width: 160px;
  transform-origin: center;
}

/* Common FAB styles */
.modal-fab {
  width: 44px;
  height: 44px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  outline: none;
}

/* Call and WhatsApp specific colors */
.modal-call {
  background: #007bff;
  /* call blue */
  color: #fff;
}

.modal-whatsapp {
  background: #fff;
  /* WhatsApp green */
  color: #fff;
}

/* Hover / focus */
.modal-fab:hover,
.modal-fab:focus {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

/* SVG sizing inside FAB */
.modal-fab svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 22px;
  max-height: 22px;
  display: block;
  line-height: 1;
}

.modal-content-con > .form-con {
  flex: 1;
  max-width: 95%;
  min-width: 260px;
  box-sizing: border-box;
  padding: 0 4px;
}

.rp-modal__panel h3 {
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 5px;
  color: black !important;
  margin-top: 5px;
  font-size: 24px;
}

.rp-modal__panel p {
  font-size: small;
  padding: 5px;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: center;
  color: #ffffff !important;
}

.rp-modal__panel input {
  display: inline-block;
  margin-bottom: 10px;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgb(0, 35, 77, 1);
}

#rp-modal-form input[name="message"] {
  height: 50px;
}

#rp-modal-form input[type="text"],
#rp-modal-form input[type="email"],
#rp-modal-form input[type="tel"],
#rp-modal-form input[type="message"] {
  border: none !important;
  border-bottom: 1px solid black !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 16px;
  letter-spacing: 1px;
  color: black;
}

.rp-modal__close {
  position: absolute;
  right: 7.5px;
  top: 7.5px;
  background: transparent !important;
  color: black !important;
  border: 0;
  font-size: 22px;
  cursor: pointer;
}

.rp-modal input,
.rp-modal button {
  font-family: inherit;
}

.rp-modal__cta {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#rp-modal-visit {
  position: absolute;
  top: 8px;
  left: 220px;
  height: 38px;
  padding: 8px 18px;
}

.captcha-submit-row {
  position: relative;
  width: 100%;
}

.g-recaptcha {
  transform: scale(0.7);
  transform-origin: left top;
}

.g-recaptcha-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-content-con {
  display: flex;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 0;
  justify-content: center;
  position: relative;
}

.modal-content-con > .left__content {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100px;
  min-width: 100px;
  gap: 30px;
  padding-bottom: 90px;
  box-sizing: border-box;
  padding-right: 10px;
  overflow: auto;
  margin-top: 10px;
}

.left__content div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.left__content span {
  text-align: center;
  font-size: small;
  color: black !important;
}

.modal-content-con > .form-con {
  flex: 1 1 50%;
  max-width: 50%;
  min-width: 260px;
  box-sizing: border-box;
  padding: 0 2px;
}

.modal-content-con > .right__content {
  display: none;
}

.modal-content-con img.left__content__img {
  display: block;
  width: 20px;
  height: auto;
  margin-bottom: 3px;
}

.modal-content-con > .form-con {
  flex: 1 1 50%;
  max-width: 55%;
  min-width: 200px;
  box-sizing: border-box;
  padding: 0 10px;
}

.right__content h4 {
  padding: 10px;
  color: #ffffff !important;
}

.right__content span {
  padding: 10px;
  font-size: small;
}

.rp-modal .right__content {
  display: none;
  padding-left: 0;
}

.rp-modal .right__content span {
  display: block;
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  line-height: 1.2;
  color: inherit;
  font-weight: 600;
  font-size: 14px;
}

.rp-modal .right__content span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(100, 46, 17, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1200px) {
  .rp-modal__panel {
    max-width: 720px;
    width: 92%;
    height: auto;
    padding: 18px;
  }

  .modal-content-con {
    gap: 14px;
  }

  .modal-content-con > .left__content {
    flex: 0 0 22%;
    max-width: 22%;
    min-width: 140px;
    padding-right: 6px;
  }

  .modal-content-con > .form-con {
    flex: 1 1 56%;
    max-width: 56%;
    min-width: 220px;
    padding: 0 8px;
  }

  .modal-content-con > .right__content {
    flex: 0 0 22%;
    max-width: 22%;
    min-width: 140px;
    padding-left: 6px;
  }

  .modal-fab-container {
    right: 14px;
    bottom: 14px;
  }

  .modal-fab svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 900px) {
  .rp-modal__panel {
    top: 50px;
    max-width: 92%;
    height: auto;
    padding: 16px;
  }

  .modal-content-con {
    flex-direction: column;
    gap: 12px;
  }

  .modal-content-con > .left__content,
  .modal-content-con > .form-con,
  .modal-content-con > .right__content {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
    padding: 0;
  }

  .modal-content-con > .left__content,
  .modal-content-con > .right__content {
    display: block;
  }

  .modal-fab-container {
    right: 12px;
    bottom: 12px;
  }

  .rp-modal .right__content span {
    padding-left: 18px;
    font-size: 13px;
  }

  .rp-modal .right__content span::before {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 520px) {
  .rp-modal__panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 12px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    border-radius: 6px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .modal-content-con {
    gap: 10px;
  }

  .modal-content-con > .left__content,
  .modal-content-con > .right__content {
    display: flex;
  }

  .modal-content-con > .form-con {
    max-width: 100%;
    min-width: 0;
    padding: 0;
  }

  .rp-modal__close {
    right: 6px;
    top: 6px;
    font-size: 20px;
  }

  .rp-modal__cta {
    flex-direction: column-reverse;
    gap: 8px;
    align-items: stretch;
    padding-right: calc(64px + env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    z-index: 10;
  }

  #rp-modal-visit {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin-top: 10px;
  }

  .captcha-submit-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .form-con .g-recaptcha {
    transform: scale(0.8);
    transform-origin: left top;
  }

  .modal-fab-container {
    position: absolute;
    right: 0;
    bottom: 15px;
    flex-direction: column;
    gap: 5px;
  }

  .modal-fab {
    width: 36px;
    height: 36px;
  }
}

/* <= 375px — very small phones: tighten spacing & control sizes */
@media (max-width: 375px) {
  .rp-modal__panel {
    padding: 10px;
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    max-height: 95vh;
    overflow-y: auto;
  }

  .rp-modal__panel h3 {
    font-size: 16px;
  }

  .modal-content-con .form-con input {
    padding: 8px;
  }

  .rp-modal .right__content span {
    padding-left: 16px;
    font-size: 12px;
  }

  .rp-modal .right__content span::before {
    width: 8px;
    height: 8px;
  }

  .rp-modal__cta {
    padding-right: calc(56px + env(safe-area-inset-right, 0px));
  }

  .form-con .g-recaptcha {
    transform: scale(0.72);
    transform-origin: left top;
  }

  .modal-fab-container {
    position: absolute;
    right: 5px;
    bottom: 10px;
    flex-direction: column;
    gap: 5px;
  }

  #rp-modal-visit {
    height: 28px;
    padding: 3px 10px;
    font-size: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: -35px;
  }

  .modal-fab {
    width: 40px;
    height: 40px;
  }

  .modal-fab svg {
    width: 18px;
    height: 18px;
    max-width: 20px;
    max-height: 20px;
  }
}

#rp-modal-form div.phone-input-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 15px;
  width: 100%;
}

#rp-modal-form .country-selector-wrapper {
  flex: 0 0 90px;
  min-width: 90px;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid black;
  border-radius: 0;
  padding: 0 0 8px 0;
  display: flex;
  align-items: center;
  position: relative;
  margin: 0;
}

#rp-modal-form select#country-select {
  width: 100%;
  border: none;
  font-size: 14px;
  color: black;
  background-color: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-line='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0px center;
  background-size: 14px;
}

#rp-modal-form input#phone-input {
  flex: 1;
  width: auto;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid black;
  border-radius: 0;
  font-size: 16px;
  margin: 0;
  background: transparent;
}

@media (max-width: 520px) {
  #rp-modal-form div.phone-input-group {
    flex-direction: row;
    gap: 8px;
  }
  #rp-modal-form .country-selector-wrapper {
    flex: 0 0 80px;
    min-width: 80px;
  }
}
