:root {
  --bfgm-teal: #56aa9b;
  --bfgm-teal-dark: #46988b;
  --bfgm-teal-soft: #d9efeb;
  --bfgm-gold: #b49a64;
  --bfgm-gold-dark: #9f8757;
  --bfgm-text: #101010;
  --bfgm-muted: #707070;
  --bfgm-line: #dedede;
  --bfgm-panel: #f2f2f2;
  --bfgm-card: #f5f5f5;
}

.bfgm-shell,
.bfgm-shell *,
.bfgm-modal,
.bfgm-modal * {
  box-sizing: border-box;
}

/* Montserrat é a tipografia base do componente. A classe .titulo-verde é
   intencionalmente excluída para usar exatamente a tipografia já definida
   pelo próprio site/Elementor. */
.bfgm-shell,
.bfgm-shell *:not(.titulo-verde),
.bfgm-modal,
.bfgm-modal * {
  font-family: "Montserrat", Arial, sans-serif !important;
}

.bfgm-shell,
.bfgm-form-area,
.bfgm-scheduler { width: 100%; }

.bfgm-admin-warning {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #e7d4a4;
  border-radius: 3px;
  background: #fff8e8;
  color: #5a4b25;
  font-size: 12px;
  line-height: 1.4;
}

/* ==========================================================
   FORMULÁRIO FLUENT FORMS — proporções do layout de referência
   ========================================================== */
.bfgm-shell form.bfgm-active {
  margin: 0 !important;
}

.bfgm-shell form.bfgm-active .ff-el-group {
  margin: 0 0 7px !important;
}

.bfgm-shell form.bfgm-active .ff-t-container {
  display: flex !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bfgm-shell form.bfgm-active .ff-t-cell {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label {
  margin: 0 0 3px !important;
  padding: 0 !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label label {
  display: block;
  margin: 0 !important;
  color: var(--bfgm-text) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label.ff-el-is-required label:after,
.bfgm-shell form.bfgm-active .ff-el-input--label.asterisk-right label:after {
  color: var(--bfgm-text) !important;
}

.bfgm-shell form.bfgm-active .ff-el-form-control,
.bfgm-shell form.bfgm-active input[type="text"],
.bfgm-shell form.bfgm-active input[type="email"],
.bfgm-shell form.bfgm-active input[type="tel"],
.bfgm-shell form.bfgm-active select {
  width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 3px 7px !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 2px !important;
  background-color: #fff !important;
  color: #171717 !important;
  box-shadow: none !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
  outline: none !important;
}

.bfgm-shell form.bfgm-active select {
  padding-right: 25px !important;
  cursor: pointer;
}

.bfgm-shell form.bfgm-active .ff-el-form-control:focus,
.bfgm-shell form.bfgm-active input[type="text"]:focus,
.bfgm-shell form.bfgm-active input[type="email"]:focus,
.bfgm-shell form.bfgm-active input[type="tel"]:focus,
.bfgm-shell form.bfgm-active select:focus {
  border-color: var(--bfgm-teal) !important;
  box-shadow: 0 0 0 2px rgba(86,170,155,.10) !important;
}

.bfgm-shell form.bfgm-active .ff-el-form-control::placeholder,
.bfgm-shell form.bfgm-active input::placeholder {
  color: #a7a7a7 !important;
  opacity: 1 !important;
}

.bfgm-shell form.bfgm-active .text-danger,
.bfgm-shell form.bfgm-active .error.text-danger,
.bfgm-shell form.bfgm-active .ff-el-is-error .error {
  margin-top: 3px !important;
  font-size: 9px !important;
  line-height: 1.25 !important;
}

/* O submit nativo continua no DOM para o Fluent Forms, mas é disparado pelo overlay. */
.bfgm-shell form.bfgm-active .bfgm-native-submit-wrap,
.bfgm-shell form.bfgm-active .bfgm-native-submit,
.bfgm-shell form.bfgm-active .ff_submit_btn_wrapper,
.bfgm-shell form.bfgm-active .ff_submit_btn_wrapper_custom,
.bfgm-shell form.bfgm-active button.ff-btn-submit,
.bfgm-shell form.bfgm-active input.ff-btn-submit {
  display: none !important;
}

/* ==========================================================
   TELEFONE INTERNACIONAL
   ========================================================== */
.bfgm-shell .iti {
  display: block !important;
  width: 100% !important;
  font-size: 10px !important;
}

.bfgm-shell .iti input.bfgm-phone-input,
.bfgm-shell form.bfgm-active .iti input[type="tel"] {
  width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  font-size: 10px !important;
}

.bfgm-shell .iti__selected-country {
  min-height: 26px !important;
  padding: 0 6px !important;
  background: transparent !important;
}

.bfgm-shell .iti__selected-country-primary {
  padding: 0 !important;
}

.bfgm-shell .iti__selected-dial-code {
  margin-left: 4px !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

.bfgm-shell .iti__arrow {
  margin-left: 4px !important;
}

.iti__dropdown-content,
.iti__country-list,
.iti__search-input {
  font-family: "Montserrat", Arial, sans-serif !important;
}

.iti__dropdown-content {
  z-index: 2147483600 !important;
}

.iti__country {
  font-size: 11px !important;
}

.iti__search-input {
  min-height: 34px !important;
  font-size: 11px !important;
}

/* ==========================================================
   COMUNIDADES / UNIDADES COMO CHIPS
   ========================================================== */
.bfgm-shell form.bfgm-active .bfgm-communities {
  margin-bottom: 6px !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-input--content {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check-input,
.bfgm-shell form.bfgm-active .bfgm-communities input[type="checkbox"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 4px 10px !important;
  border: 1px solid #d6d6d6 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #252525 !important;
  box-shadow: none !important;
  font-size: 9px !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  cursor: pointer !important;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check-label:hover {
  border-color: var(--bfgm-teal) !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check.is-selected .ff-el-form-check-label,
.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check:has(input:checked) .ff-el-form-check-label {
  border-color: var(--bfgm-teal) !important;
  background: var(--bfgm-teal) !important;
  color: #fff !important;
}

/* ==========================================================
   POLÍTICA DE PRIVACIDADE — checkbox real e marcado por padrão
   ========================================================== */
.bfgm-shell form.bfgm-active .bfgm-privacy {
  margin: 1px 0 5px !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy .ff-el-input--content,
.bfgm-shell form.bfgm-active .bfgm-privacy .ff-el-form-check,
.bfgm-shell form.bfgm-active .bfgm-privacy .bfgm-privacy-row {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #222 !important;
  font-size: 9px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
}

.bfgm-shell form.bfgm-active input.bfgm-privacy-checkbox,
.bfgm-shell form.bfgm-active .bfgm-privacy input[type="checkbox"] {
  position: static !important;
  display: inline-block !important;
  flex: 0 0 13px !important;
  width: 13px !important;
  min-width: 13px !important;
  max-width: 13px !important;
  height: 13px !important;
  min-height: 13px !important;
  max-height: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #9e9e9e !important;
  border-radius: 2px !important;
  background: #fff !important;
  box-shadow: none !important;
  opacity: 1 !important;
  clip: auto !important;
  clip-path: none !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  accent-color: var(--bfgm-teal) !important;
  cursor: pointer !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy a {
  color: #222 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy a:hover {
  color: var(--bfgm-teal-dark) !important;
}

/* Botão principal, igual ao desenho: baixo, largo e dourado. */
.bfgm-scheduler { margin-top: 5px; }

.bfgm-open {
  width: 100%;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 2px;
  padding: 7px 16px;
  background: var(--bfgm-gold);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.bfgm-open:hover { background: var(--bfgm-gold-dark); }
.bfgm-open:active { transform: translateY(1px); }
.bfgm-open:focus-visible,
.bfgm-modal button:focus-visible {
  outline: 3px solid rgba(86,170,155,.34);
  outline-offset: 2px;
}

/* ==========================================================
   OVERLAY / AGENDAMENTO
   ========================================================== */
body.bfgm-modal-open { overflow: hidden; }

.bfgm-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bfgm-modal.is-open { display: flex; }

.bfgm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18,24,24,.62);
  backdrop-filter: blur(3px);
}

.bfgm-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.23);
}

.bfgm-close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #333;
  font-size: 28px;
  line-height: 32px;
  cursor: pointer;
}

.bfgm-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 560px;
}

.bfgm-sidebar {
  padding: 42px 30px;
  background: var(--bfgm-panel);
  color: var(--bfgm-text);
}

.bfgm-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--bfgm-teal);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.bfgm-company { margin-bottom: 5px; font-size: 12px; }
.bfgm-sidebar h3 { margin: 0 0 22px; color: #111; font-size: 17px; line-height: 1.25; font-weight: 700; }
.bfgm-meta { display: grid; gap: 9px; font-size: 12px; }
.bfgm-meta > div { display: flex; align-items: center; gap: 7px; }
.bfgm-meta-icon { color: var(--bfgm-teal); font-size: 15px; }

.bfgm-main { padding: 36px 42px 38px; min-width: 0; }

.bfgm-calendar-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin: 2px 0 16px;
}

.bfgm-month-label { text-align: center; color: #151515; font-size: 16px; font-weight: 700; }

.bfgm-month-nav {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #777;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.bfgm-month-nav:hover:not(:disabled) { background: #f3f3f3; color: #222; }
.bfgm-month-nav:disabled { opacity: .25; cursor: default; }

.bfgm-weekdays,
.bfgm-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bfgm-weekdays { margin-bottom: 5px; }

.bfgm-weekdays span {
  padding: 7px 0;
  text-align: center;
  color: #909090;
  font-size: 11px;
  font-weight: 600;
}

.bfgm-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / .82;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #151515;
  font-size: 12px;
  cursor: pointer;
}

.bfgm-day::before {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  transition: background .14s ease;
}

.bfgm-day span { position: relative; z-index: 1; }
.bfgm-day:hover:not(:disabled)::before { background: var(--bfgm-teal-soft); }
.bfgm-day.is-selected::before { background: var(--bfgm-teal); }
.bfgm-day.is-selected span { color: #0c2b26; font-weight: 700; }
.bfgm-day.is-outside,
.bfgm-day:disabled { color: #d1d1d1; cursor: default; }
.bfgm-day.is-empty { visibility: hidden; }

.bfgm-time-area {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--bfgm-line);
}

.bfgm-date-title { margin-bottom: 13px; color: #111; font-size: 13px; font-weight: 700; }
.bfgm-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }

.bfgm-time {
  min-height: 39px;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  background: #fff;
  color: #777;
  font-size: 12px;
  cursor: pointer;
  transition: all .14s ease;
}

.bfgm-time:hover { border-color: var(--bfgm-teal); background: var(--bfgm-teal-soft); color: #2a5d54; }
.bfgm-time.is-selected { border-color: var(--bfgm-teal); background: var(--bfgm-teal); color: #fff; }

.bfgm-step-next > h2 {
  margin: 3px 0 8px;
  color: var(--bfgm-teal-dark);
  text-align: center;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 700;
}

.bfgm-selection { margin: 0 auto 24px; color: #555; text-align: center; font-size: 13px; }
.bfgm-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bfgm-info-card { padding: 22px 20px; background: var(--bfgm-card); }

.bfgm-card-number {
  margin-bottom: 4px;
  color: var(--bfgm-teal);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.bfgm-info-card h3 {
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #cfcfcf;
  color: var(--bfgm-teal);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}

.bfgm-info-card p { margin: 0; color: #222; font-size: 12px; line-height: 1.48; }
.bfgm-actions { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }

.bfgm-change,
.bfgm-confirm {
  min-height: 44px;
  border-radius: 4px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bfgm-change { border: 1px solid #cfcfcf; background: #fff; color: #444; }
.bfgm-confirm { border: 1px solid var(--bfgm-gold); background: var(--bfgm-gold); color: #fff; }
.bfgm-confirm:hover { border-color: var(--bfgm-gold-dark); background: var(--bfgm-gold-dark); }

/* Confirmação final no próprio overlay */
.bfgm-step-success {
  max-width: 520px;
  margin: 0 auto;
  padding: 55px 20px 35px;
  text-align: center;
}

.bfgm-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--bfgm-teal);
  color: #fff;
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
}

.bfgm-step-success h2 {
  margin: 0 0 9px;
  color: var(--bfgm-teal-dark);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
}

.bfgm-step-success p {
  margin: 0 auto 12px;
  color: #222;
  font-size: 13px;
  line-height: 1.6;
}

.bfgm-success-lead { font-weight: 600; }

.bfgm-success-selection {
  margin: 22px auto 24px;
  padding: 12px 16px;
  border-radius: 4px;
  background: #f3f3f3;
  color: #333;
  font-size: 12px;
  font-weight: 600;
}

.bfgm-success-close {
  min-width: 170px;
  min-height: 44px;
  border: 0;
  border-radius: 3px;
  padding: 11px 22px;
  background: var(--bfgm-gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bfgm-success-close:hover { background: var(--bfgm-gold-dark); }

@media (max-width: 720px) {
  .bfgm-modal { padding: 0; align-items: stretch; }
  .bfgm-dialog { width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .bfgm-layout { display: block; min-height: 100%; }
  .bfgm-sidebar { padding: 24px 24px 20px; }
  .bfgm-monogram { width: 44px; height: 44px; margin-bottom: 12px; }
  .bfgm-sidebar h3 { margin-bottom: 13px; }
  .bfgm-meta { grid-template-columns: repeat(2, auto); justify-content: start; gap: 10px 18px; }
  .bfgm-main { padding: 26px 20px 30px; }
  .bfgm-close { top: 10px; right: 10px; }
  .bfgm-day { min-height: 40px; }
  .bfgm-day::before { width: 35px; height: 35px; }
  .bfgm-times { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .bfgm-next-grid { grid-template-columns: 1fr; gap: 12px; }
  .bfgm-step-next > h2 { font-size: 24px; }
  .bfgm-actions { flex-direction: column-reverse; }
  .bfgm-change,
  .bfgm-confirm { width: 100%; }
  .bfgm-step-success { padding: 35px 6px 25px; }
  .bfgm-step-success h2 { font-size: 24px; }
}

@media (max-width: 560px) {
  /* No telemóvel, preserva área de toque confortável. */
  .bfgm-shell form.bfgm-active .ff-t-container { display: block !important; }
  .bfgm-shell form.bfgm-active .ff-el-group { margin-bottom: 10px !important; }
  .bfgm-shell form.bfgm-active .ff-el-input--label label { font-size: 12px !important; }
  .bfgm-shell form.bfgm-active .ff-el-form-control,
  .bfgm-shell form.bfgm-active input[type="text"],
  .bfgm-shell form.bfgm-active input[type="email"],
  .bfgm-shell form.bfgm-active input[type="tel"],
  .bfgm-shell form.bfgm-active select,
  .bfgm-shell .iti input.bfgm-phone-input,
  .bfgm-shell form.bfgm-active .iti input[type="tel"] {
    height: 42px !important;
    min-height: 42px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 13px !important;
  }
  .bfgm-shell .iti__selected-country { min-height: 40px !important; }
  .bfgm-shell .iti__selected-dial-code { font-size: 12px !important; }
  .bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check-label {
    min-height: 32px !important;
    padding: 7px 11px !important;
    font-size: 11px !important;
  }
  .bfgm-shell form.bfgm-active .bfgm-privacy-label { font-size: 11px !important; }
  .bfgm-open { height: 44px; min-height: 44px; font-size: 12px; }
}

@media (max-width: 430px) {
  .bfgm-main { padding-left: 14px; padding-right: 14px; }
  .bfgm-sidebar { padding-left: 18px; padding-right: 18px; }
  .bfgm-times { grid-template-columns: repeat(2, 1fr); }
  .bfgm-day { min-height: 38px; font-size: 11px; }
  .bfgm-day::before { width: 33px; height: 33px; }
}

/* ==========================================================
   V1.4 — refinamento visual do formulário + reforço de estados
   ========================================================== */
.bfgm-shell form.bfgm-active .ff-el-group {
  margin-bottom: 11px !important;
}

.bfgm-shell form.bfgm-active .ff-t-container {
  gap: 12px !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label {
  margin-bottom: 5px !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label label {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
}

.bfgm-shell form.bfgm-active .ff-el-form-control,
.bfgm-shell form.bfgm-active input[type="text"],
.bfgm-shell form.bfgm-active input[type="email"],
.bfgm-shell form.bfgm-active input[type="tel"],
.bfgm-shell form.bfgm-active select {
  height: 35px !important;
  min-height: 35px !important;
  padding: 6px 10px !important;
  border-color: #cfcfcf !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  line-height: 21px !important;
}

.bfgm-shell form.bfgm-active select {
  padding-right: 34px !important;
}

/* Telefone: o padding esquerdo real é calculado em JS conforme a largura
   da bandeira + indicativo. Isso evita sobreposição em qualquer país. */
.bfgm-shell .iti {
  width: 100% !important;
  font-size: 12px !important;
}

.bfgm-shell .iti input.bfgm-phone-input,
.bfgm-shell form.bfgm-active .iti input[type="tel"] {
  height: 35px !important;
  min-height: 35px !important;
  padding-top: 6px !important;
  padding-right: 10px !important;
  padding-bottom: 6px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  line-height: 21px !important;
}

.bfgm-shell .iti__selected-country {
  height: 33px !important;
  min-height: 33px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 4px 0 0 4px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.bfgm-shell .iti__selected-country:hover,
.bfgm-shell .iti__selected-country:focus {
  background: #f7f7f7 !important;
}

.bfgm-shell .iti__selected-dial-code {
  margin-left: 6px !important;
  color: #222 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

.bfgm-shell .iti__arrow {
  margin-left: 6px !important;
}

.bfgm-shell .iti__dropdown-content {
  min-width: 290px !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.16) !important;
}

.bfgm-shell .iti__country {
  min-height: 36px !important;
  font-size: 12px !important;
}

.bfgm-shell .iti__search-input {
  min-height: 38px !important;
  font-size: 12px !important;
}

/* Comunidades: estado visual é também aplicado em inline pelo JS para
   não depender da especificidade do CSS do tema/Fluent Forms. */
.bfgm-shell form.bfgm-active .bfgm-communities {
  margin-bottom: 10px !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-input--content {
  gap: 7px !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check-label {
  min-height: 29px !important;
  padding: 6px 12px !important;
  border: 1px solid #cfcfcf !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #171717 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  user-select: none !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check[data-bfgm-selected="1"] .ff-el-form-check-label,
.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check.is-selected .ff-el-form-check-label,
.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check-label.is-selected,
.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-form-check:has(input:checked) .ff-el-form-check-label {
  border-color: var(--bfgm-teal) !important;
  background: var(--bfgm-teal) !important;
  color: #fff !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy {
  margin: 2px 0 11px !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy-label {
  gap: 7px !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

.bfgm-shell form.bfgm-active input.bfgm-privacy-checkbox,
.bfgm-shell form.bfgm-active .bfgm-privacy input[type="checkbox"] {
  flex-basis: 15px !important;
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
}

.bfgm-scheduler {
  margin-top: 7px !important;
}

.bfgm-open {
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 3px !important;
  padding: 9px 16px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

@media (max-width: 640px) {
  .bfgm-shell form.bfgm-active .ff-t-container {
    gap: 9px !important;
  }

  .bfgm-shell form.bfgm-active .ff-el-input--label label,
  .bfgm-shell form.bfgm-active .ff-el-form-control,
  .bfgm-shell form.bfgm-active input[type="text"],
  .bfgm-shell form.bfgm-active input[type="email"],
  .bfgm-shell form.bfgm-active input[type="tel"],
  .bfgm-shell form.bfgm-active select {
    font-size: 12px !important;
  }
}


/* ==========================================================
   V1.5 — tipografia maior + comunidades multisseleção robustas
   ========================================================== */
.bfgm-shell form.bfgm-active {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.bfgm-form-area {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.bfgm-shell form.bfgm-active .ff-el-group {
  margin-bottom: 13px !important;
}

.bfgm-shell form.bfgm-active .ff-t-container {
  gap: 13px !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label {
  margin-bottom: 6px !important;
}

.bfgm-shell form.bfgm-active .ff-el-input--label label {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.bfgm-shell form.bfgm-active .ff-el-form-control,
.bfgm-shell form.bfgm-active input[type="text"],
.bfgm-shell form.bfgm-active input[type="email"],
.bfgm-shell form.bfgm-active input[type="tel"],
.bfgm-shell form.bfgm-active select {
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 11px !important;
  border-radius: 6px !important;
  font-size: 13.5px !important;
  line-height: 22px !important;
}

.bfgm-shell form.bfgm-active select {
  padding-right: 36px !important;
}

.bfgm-shell .iti,
.bfgm-shell .iti input.bfgm-phone-input,
.bfgm-shell form.bfgm-active .iti input[type="tel"] {
  font-size: 13.5px !important;
}

.bfgm-shell .iti input.bfgm-phone-input,
.bfgm-shell form.bfgm-active .iti input[type="tel"] {
  height: 40px !important;
  min-height: 40px !important;
  padding-top: 8px !important;
  padding-right: 11px !important;
  padding-bottom: 8px !important;
  line-height: 22px !important;
}

.bfgm-shell .iti__selected-country {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 9px !important;
}

.bfgm-shell .iti__selected-dial-code {
  margin-left: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.bfgm-shell .iti__country,
.bfgm-shell .iti__search-input {
  font-size: 13px !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .bfgm-community-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities .ff-el-input--content {
  display: block !important;
}

.bfgm-community-buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
}

.bfgm-community-chip {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 7px 13px !important;
  border: 1px solid #c9c9c9 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #171717 !important;
  box-shadow: none !important;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease !important;
}

.bfgm-community-chip:hover,
.bfgm-community-chip:focus-visible {
  border-color: var(--bfgm-teal) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(86,170,155,.12) !important;
}

.bfgm-community-chip.is-selected,
.bfgm-community-chip[data-selected="1"],
.bfgm-community-chip[aria-pressed="true"] {
  border-color: var(--bfgm-teal) !important;
  background: var(--bfgm-teal) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities {
  margin-bottom: 12px !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy {
  margin: 1px 0 0 !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy-label {
  gap: 8px !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
}

.bfgm-shell form.bfgm-active input.bfgm-privacy-checkbox,
.bfgm-shell form.bfgm-active .bfgm-privacy input[type="checkbox"] {
  flex-basis: 16px !important;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
}

.bfgm-scheduler {
  margin-top: 14px !important;
}

.bfgm-open {
  height: 46px !important;
  min-height: 46px !important;
  padding: 10px 18px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

@media (max-width: 560px) {
  .bfgm-shell form.bfgm-active .ff-el-input--label label {
    font-size: 13px !important;
  }

  .bfgm-shell form.bfgm-active .ff-el-form-control,
  .bfgm-shell form.bfgm-active input[type="text"],
  .bfgm-shell form.bfgm-active input[type="email"],
  .bfgm-shell form.bfgm-active input[type="tel"],
  .bfgm-shell form.bfgm-active select,
  .bfgm-shell .iti input.bfgm-phone-input,
  .bfgm-shell form.bfgm-active .iti input[type="tel"] {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 14px !important;
  }

  .bfgm-shell .iti__selected-country {
    height: 42px !important;
    min-height: 42px !important;
  }

  .bfgm-shell .iti__selected-dial-code {
    font-size: 13px !important;
  }

  .bfgm-community-chip {
    min-height: 36px !important;
    padding: 8px 13px !important;
    font-size: 13px !important;
  }

  .bfgm-shell form.bfgm-active .bfgm-privacy-label {
    font-size: 12.5px !important;
  }

  .bfgm-open {
    height: 48px !important;
    min-height: 48px !important;
    font-size: 14px !important;
  }
}

/* ==========================================================
   V1.6 — validação obrigatória + confirmação no formulário
   ========================================================== */
.bfgm-shell form.bfgm-active .bfgm-validation-error {
  margin: 5px 0 0 !important;
  color: #b42318 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

.bfgm-shell form.bfgm-active .bfgm-invalid .ff-el-form-control,
.bfgm-shell form.bfgm-active .bfgm-invalid input[type="text"],
.bfgm-shell form.bfgm-active .bfgm-invalid input[type="email"],
.bfgm-shell form.bfgm-active .bfgm-invalid input[type="tel"],
.bfgm-shell form.bfgm-active .bfgm-invalid select,
.bfgm-shell form.bfgm-active .bfgm-invalid .iti input {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 2px rgba(180,35,24,.08) !important;
}

.bfgm-shell form.bfgm-active .bfgm-communities.bfgm-invalid .bfgm-community-chip {
  border-color: #b42318 !important;
}

.bfgm-shell form.bfgm-active .bfgm-privacy.bfgm-invalid input[type="checkbox"] {
  outline: 2px solid rgba(180,35,24,.16) !important;
  outline-offset: 2px !important;
}

/* Após o envio, a confirmação própria substitui a mensagem padrão do Fluent Forms. */
.bfgm-shell .bfgm-thankyou {
  display: none;
  padding: 4px 0 2px;
  color: var(--bfgm-text);
}

.bfgm-shell.is-success .bfgm-thankyou {
  display: block !important;
}

.bfgm-shell.is-success .bfgm-form-area > .fluentform,
.bfgm-shell.is-success .bfgm-form-area > [class*="fluentform_wrapper"],
.bfgm-shell.is-success .ff-message-success,
.bfgm-shell.is-success form.bfgm-active {
  display: none !important;
}

.bfgm-thankyou h2 {
  margin: 0 0 20px !important;
  color: #0a0a0a !important;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: clamp(24px, 3.1vw, 34px) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.02em !important;
}


.bfgm-thankyou p {
  margin: 0 0 17px !important;
  color: #121212 !important;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

.bfgm-thankyou .bfgm-thankyou-lead {
  font-weight: 650 !important;
}

.bfgm-shell.is-success .bfgm-scheduler {
  margin-top: 16px !important;
}

@media (max-width: 560px) {
  .bfgm-shell form.bfgm-active .bfgm-validation-error {
    font-size: 11.5px !important;
  }

  .bfgm-thankyou h2 {
    font-size: 26px !important;
    margin-bottom: 17px !important;
  }

  .bfgm-thankyou p {
    font-size: 13.5px !important;
  }
}


/* ==========================================================
   V1.8 — confirmação, título verde, topo real da página e mobile
   ========================================================== */

/* A mensagem nativa do Fluent Forms não é usada neste fluxo.
   Mantê-la sempre oculta evita a caixa branca vazia ao reiniciar. */
.bfgm-shell .ff-message-success,
.bfgm-shell .ff-message-success-wrapper {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Classe para usar no título externo "Agende uma Visita" no Elementor.
   O plugin adiciona a classe de estado no body somente após envio com sucesso. */
body.bfgm-visit-success .bf-agende-visita-titulo {
  display: none !important;
}

/* O preto segue o mesmo padrão tipográfico indicado no layout do site.
   O span .titulo-verde fica livre para herdar o CSS já existente no site. */
.bfgm-thankyou h2 {
  margin: 0 0 22px !important;
  color: #000 !important;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 30px !important;
  font-weight: 700 !important;
  line-height: 1.1em !important;
  letter-spacing: 0 !important;
}

.bfgm-thankyou h2 .titulo-verde {
  font-family: "Playfair Display", serif !important;
  color: #54A796 !important;
  font-weight: 900 !important;
  font-style: italic !important;
}

.bfgm-thankyou p {
  font-size: 15px !important;
  line-height: 1.55 !important;
}

.bfgm-thankyou .bfgm-thankyou-lead {
  font-weight: 700 !important;
}

/* No mobile o próprio diálogo passa a ser a área de rolagem.
   100dvh acompanha corretamente a altura útil do navegador móvel. */
@media (max-width: 720px) {
  .bfgm-modal {
    overflow: hidden !important;
  }

  .bfgm-dialog {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth;
  }

  .bfgm-layout {
    min-height: auto !important;
  }

  .bfgm-close {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 2147483640 !important;
  }

  .bfgm-main {
    padding-bottom: max(34px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 560px) {
  .bfgm-thankyou h2 {
    font-size: 28px !important;
    line-height: 1.1em !important;
    margin-bottom: 19px !important;
  }

  .bfgm-thankyou p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
}
