/* =========================================================
   Modal "Agende pelo WhatsApp" — Ribondi Odontologia
   Prefixo rb- para não colidir com Elementor/OceanWP.
========================================================= */

.rb-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 20, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.rb-form-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.rb-modal-open {
  overflow: hidden;
}

.rb-form-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.rb-form-overlay.is-open .rb-form-modal {
  transform: translateY(0);
}

.rb-form-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.rb-form-close:hover {
  background: #f2f2f2;
  color: #3e3b3f;
}

.rb-form-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-right: 36px;
}
.rb-form-badge {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7f8ee;
  color: #25d366;
  font-size: 26px;
}
.rb-form-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #3e3b3f;
  line-height: 1.25;
}
.rb-form-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: #757575;
  line-height: 1.4;
}

.rb-form-field {
  margin-bottom: 16px;
}
.rb-form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 400;
  color: #3e3b3f;
}
.rb-form-field input,
.rb-form-field select {
  width: 100%;
  padding: 13px 16px;
  font-size: 16px; /* >= 16px evita zoom automático no iOS */
  font-weight: 400;
  color: #3e3b3f;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rb-form-field input::placeholder {
  color: #a5a5a5;
}
.rb-form-field select:invalid,
.rb-form-field select option[value=""] {
  color: #a5a5a5;
}
.rb-form-field input:focus,
.rb-form-field select:focus {
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}
.rb-form-field.is-invalid input,
.rb-form-field.is-invalid select {
  border-color: #d9534f;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.12);
}

.rb-form-msg {
  display: none;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
}
.rb-form-msg.is-error {
  display: block;
  color: #c0392b;
}

.rb-form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: 12px;
  background: #25d366;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.rb-form-submit:hover {
  background: #1ebe5a;
}
.rb-form-submit:disabled {
  background: #8fdfae;
  cursor: wait;
}

.rb-form-lgpd {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: #8a8a8a;
}
.rb-form-lgpd a {
  color: #8a8a8a;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .rb-form-modal {
    padding: 26px 20px 20px;
    border-radius: 20px;
  }
  .rb-form-title {
    font-size: 20px;
  }
}
