/* 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: 90%;
  max-width: 650px;
  height: 600px;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  font-family: inherit;
  z-index: 10001;
  background-color: rgb(126, 90, 37);
  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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Floating action container inside modal (bottom-right) */
.modal-fab-container {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 10px;
  z-index: 40;
  align-items: 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;
}

.rp-modal__panel h3 {
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 5px;
  color: rgb(255, 255, 255);
}

.rp-modal__panel p {
  font-size: small;
  padding: 5px;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: center;
  color: rgb(255, 255, 255);
}

.rp-modal__panel input {
  display: inline-block;
  margin-bottom: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
}

#rp-modal-form input[name="message"] {
  height: 80px;
}

.rp-modal__close {
  position: absolute;
  right: 7.5px;
  top: 7.5px;
  background: transparent !important;
  color: rgb(237, 226, 212);
  border: 0;
  font-size: 22px;
  cursor: pointer;
}

.rp-modal__cta {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#rp-modal-cancel,
#rp-modal-visit {
  padding: 8px 14px;
  cursor: pointer;
  background: rgb(237, 226, 212);
  border-radius: 8px;
  border: none;
}

.modal-content-con {
  display: flex;
  gap: 18px;
  align-items: stretch;
  /* make columns equal height */
  width: 100%;
  box-sizing: border-box;
  padding: 6px 0;
}

/* left column (icons / bullets) */
.modal-content-con > .left__content {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 25%;
  min-width: 160px;
  gap: 25px;
  /* keep it usable on narrow but desktop-like widths */
  box-sizing: border-box;
  padding-right: 8px;
  overflow: auto;
  /* allow scrolling if content is tall */
}

.left__content div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.left__content span {
  text-align: center;
  font-size: small;
  color: #ede2d5;
}

/* center column (form) */
.modal-content-con > .form-con {
  flex: 1 1 50%;
  max-width: 50%;
  min-width: 260px;
  box-sizing: border-box;
  padding: 0 8px;
}

/* right column (summary / extras) */
.modal-content-con > .right__content {
  flex: 0 0 25%;
  max-width: 25%;
  min-width: 160px;
  box-sizing: border-box;
  padding-left: 8px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

/* small helpers to keep inner elements tidy */
.modal-content-con img.left__content__img {
  display: block;
  width: 48px;
  height: auto;
  margin-bottom: 8px;
}

/* form inputs full width */
.modal-content-con .form-con input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.right__content h4 {
  padding: 10px;
  color: rgb(255, 255, 255);
}

.right__content span {
  padding: 10px;
  font-size: small;
}

.rp-modal .right__content {
  display: block;
  padding-left: 0;
}

.rp-modal .right__content span {
  display: block;
  /* stack vertically */
  position: relative;
  padding-left: 20px;
  /* space for the circle */
  margin-bottom: 8px;
  line-height: 1.2;
  color: #dacec3;
  font-weight: 600;
  font-size: 14px;
}

/* the circle bullet */
.rp-modal .right__content span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(255, 255, 255);
  /* warm gradient matching site */
  box-shadow: 0 4px 10px rgba(100, 46, 17, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1200px) {
  /* large tablets / small laptops — keep columns but tighten sizes */
  .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;
  }
}

/* <= 900px — tablets / large phones: stack vertically, form-first layout */
@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;
  }

  /* keep side columns visible but stacked above/below the form */
  .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;
  }
}

/* <= 520px — phones: focus on form, hide side columns, full width modal */
@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;
  }

  .modal-content-con {
    gap: 10px;
  }

  .modal-content-con > .left__content,
  .modal-content-con > .right__content {
    display: none;
    /* hide non-essential columns on phones */
  }

  .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));
    padding-left: calc(64px + env(safe-area-inset-right, 0px));
    /* keep CTA clear of right-bottom FAB */
    box-sizing: border-box;
    z-index: 10;
    /* ensure CTA sits above panel content but below FAB (FAB has higher z-index) */
  }

  #rp-modal-cancel,
  #rp-modal-visit {
    width: 100%;
    max-width: 100%;
  }

  .modal-fab-container {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* <= 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));
  }

  .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));
  }

  .modal-fab {
    width: 40px;
    height: 40px;
  }

  .modal-fab svg {
    width: 18px;
    height: 18px;
    max-width: 20px;
    max-height: 20px;
  }
}
