/* mapa-doctores 17.8 · formulario único de contacto (ventana y costado de la ficha) + bloque de cercanos del inactivo.
   Autocontenido: lo cargan el buscador, la ficha y las páginas por zona. Colores de marca KeepSmiling. */
.mmd-cform { --cf-navy: #001d57; --cf-blue: #0073aa; --cf-wa: #1a7f37; --cf-wa-d: #156b2e; --cf-line: #d6dbe3; --cf-muted: #5f6670;
  display: grid; gap: 12px; font-size: 15px; color: #1f2328; }
.mmd-cform *, .mmd-cform *::before, .mmd-cform *::after { box-sizing: border-box; }
.mmd-cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mmd-cf-tel { grid-template-columns: 112px 1fr; }
.mmd-cf-f { display: grid; gap: 4px; margin: 0; font-size: 13px; color: var(--cf-muted); font-weight: 600; }
.mmd-cf-f input, .mmd-cf-f select, .mmd-cf-f textarea { width: 100%; margin: 0; padding: 11px 12px; border: 1px solid var(--cf-line); border-radius: 8px;
  font: inherit; font-size: 16px; font-weight: 400; color: #1f2328; background: #fff; min-height: 46px; }
.mmd-cf-f textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.mmd-cf-f input:focus, .mmd-cf-f select:focus, .mmd-cf-f textarea:focus { outline: none; border-color: var(--cf-navy); box-shadow: 0 0 0 3px rgba(0, 29, 87, .12); }
.mmd-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mmd-chips-t { font-size: 13px; font-weight: 600; color: var(--cf-muted); margin-right: 2px; }
.mmd-cform .mmd-cf-msg[hidden] { display: none; }
.mmd-cform .mmd-cf-msg-toggle { appearance: none; background: none; border: 0; padding: 0; margin: -2px 0 0; width: auto; min-height: 0; justify-self: start;
  color: var(--cf-navy); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: underline; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0; }
.mmd-cform .mmd-cf-msg-toggle::before, .mmd-cform .mmd-cf-msg-toggle::after { content: none !important; display: none !important; }
.mmd-cform .mmd-cf-msg-toggle[hidden] { display: none; }
.mmd-cform .mmd-chip { appearance: none; border: 1.5px solid #c9d3e6; background: #fff; color: var(--cf-navy); border-radius: 999px; padding: 7px 12px;
  font: inherit; font-size: 13.5px; line-height: 1.2; cursor: pointer; width: auto; height: auto; min-height: 0; margin: 0; box-shadow: none; text-transform: none; letter-spacing: 0; }
.mmd-cform .mmd-chip::before, .mmd-cform .mmd-chip::after { content: none !important; display: none !important; }
.mmd-cform .mmd-chip[aria-pressed="true"] { background: var(--cf-navy); border-color: var(--cf-navy); color: #fff; }
.mmd-cform .mmd-privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--cf-muted); line-height: 1.4; margin: 0; font-weight: 400; }
.mmd-cform .mmd-privacy input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--cf-navy); }
.mmd-cform .mmd-privacy a { color: var(--cf-navy); text-decoration: underline; }
.mmd-cf-btns { display: grid; gap: 8px; }
.mmd-cform .mmd-cf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 16px; border-radius: 10px;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; border: 2px solid transparent; margin: 0; box-shadow: none; text-transform: none; letter-spacing: 0; line-height: 1; }
.mmd-cform .mmd-cf-btn::before, .mmd-cform .mmd-cf-btn::after { content: none !important; display: none !important; }
.mmd-cform .mmd-cf-btn[hidden] { display: none; }
.mmd-cform .mmd-cf-wa { background: var(--cf-wa); color: #fff; }
.mmd-cform .mmd-cf-wa:hover { background: var(--cf-wa-d); }
.mmd-cform .mmd-cf-mail { background: #fff; color: var(--cf-navy); border-color: var(--cf-navy); }
.mmd-cform .mmd-cf-mail:hover { background: #eef2f8; }
.mmd-cform .mmd-cf-wa[hidden] + .mmd-cf-mail { background: var(--cf-navy); color: #fff; }
.mmd-cform .mmd-cf-btn:disabled { opacity: .6; cursor: default; }
.mmd-cform .mmd-contact-status { min-height: 18px; margin: 0; font-size: 14px; color: var(--cf-navy); }
.mmd-cform.mmd-sent .mmd-contact-status { color: #1a7f37; font-weight: 600; }
.mmd-cform .mmd-contact-status a { color: var(--cf-navy); font-weight: 700; text-decoration: underline; }
.mmd-cform .mmd-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* 17.8.4: verde de WhatsApp con contraste AA para texto blanco (5,1:1; el #25d366 daba 1,98:1). Pisa las variables de
   buscador.css y ficha.css porque esta hoja carga después de las dos. */
.mmd17 { --wa: #1a7f37; --wa-dark: #156b2e; }
.mmd-ficha-main { --mmd-wa: #1a7f37; --mmd-wa-dark: #156b2e; }

/* Ventana */
.mmd-modal[hidden] { display: none; }
.mmd-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mmd-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 29, 87, .55); }
.mmd-modal-dialog { position: relative; background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); box-sizing: border-box; }
.mmd-modal-dialog h3 { margin: 0 0 2px; padding-right: 44px; color: #001d57; font-size: 20px; font-family: "Poppins", inherit; }
.mmd-modal .mmd-contact-doctor { margin: 0 0 14px; color: #5f6670; font-weight: 600; }
.mmd-modal .mmd-modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f0f0; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
body.mmd-modal-open { overflow: hidden; }
@media (max-width: 600px) {
  .mmd-modal { padding: 0; align-items: flex-end; }
  .mmd-modal-dialog { max-width: none; border-radius: 16px 16px 0 0; max-height: 94vh; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .mmd-cf-row { grid-template-columns: 1fr; }
  .mmd-cf-tel { grid-template-columns: 104px 1fr; }
}

/* Ficha: formulario fijo al costado en escritorio */
.mmd-ficha-grid.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.mmd-ficha-col { min-width: 0; }
.mmd-ficha-aside { position: sticky; top: 88px; padding-top: 16px; }
.mmd-aside-card { background: #fff; border: 1px solid #e4e7eb; border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 29, 87, .08); padding: 16px 18px;
  max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; }
.mmd-aside-card h2 { font-size: 18px; margin: 0 0 10px; }
.mmd-aside-card .mmd-cform { gap: 9px; font-size: 14px; }
.mmd-aside-card .mmd-cf-f input, .mmd-aside-card .mmd-cf-f select { min-height: 40px; padding: 8px 10px; font-size: 15px; }
.mmd-aside-card .mmd-cf-f textarea { min-height: 62px; padding: 8px 10px; font-size: 15px; }
.mmd-aside-card .mmd-cf-f > span { font-size: 12px; }
.mmd-aside-card .mmd-chip { padding: 5px 10px; font-size: 12.5px; }
.mmd-aside-card .mmd-cf-btn { min-height: 44px; font-size: 15px; }
@media (max-width: 991px) {
  .mmd-ficha-grid.has-aside { display: block; }
  .mmd-ficha-aside { display: none; }
}

/* Ficha de inactivo: ortodoncistas KeepSmiling cerca */
.mmd-cerca-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mmd-cerca-card { background: #fff; border: 1px solid #e4e7eb; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 29, 87, .08); padding: 14px; display: grid; gap: 12px; }
.mmd-cerca-head { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.mmd-cerca-head > div { display: grid; gap: 2px; }
.mmd-cerca-head img { width: 40px; height: 40px; }
.mmd-cerca-name { font-family: "Poppins", inherit; font-weight: 700; color: #001d57 !important; text-decoration: none; font-size: 16px; }
.mmd-cerca-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.mmd-cerca-acts .mmd-btn { flex: 1; min-height: 44px; }
@media (max-width: 991px) { .mmd-cerca-list { grid-template-columns: 1fr; } }
