/* MAN-1376: icono de agenda + secciones plegables en celular. Tokens de docs/design/mandalo.tokens.json.
   Escritorio (más de 800 px) conserva su diseño: los encabezados plegables sólo aparecen en celular. */

/* Icono de agenda a la izquierda de la dirección o del contacto (todas las anchuras). */
.mdx-agenda-btn{flex:0 0 48px;width:48px;min-width:48px;height:52px;min-height:52px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #7185a3;border-radius:12px;background:#fff;color:#205abb;cursor:pointer;box-shadow:none;line-height:1}
.mdx-agenda-btn:hover{background:#eef4ff;border-color:#205abb}
.mdx-agenda-btn:focus-visible{outline:3px solid #205abb;outline-offset:3px}
.mdx-agenda-btn svg{display:block;width:22px;height:22px}
.mdx-agenda-native[hidden]{display:none!important}
/* El icono ya ofrece los contactos del teléfono; el botón suelto sobra donde está el icono. */
.mdx-has-agenda .mandalo-contact-picker-btn{display:none}
.mdx-agenda-field{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:8px;align-items:center}
.mdx-agenda-field>*{grid-column:1/-1}
.mdx-agenda-field>.mdx-agenda-btn{grid-column:1}
.mdx-agenda-field>.mdx-agenda-btn+*{grid-column:2;min-width:0;width:100%}
.mdx-agenda-card{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:12px;align-items:start}
.mdx-agenda-card>*{grid-column:1/-1}
.mdx-agenda-card>.mdx-agenda-btn{grid-column:1;grid-row:1}
.mdx-agenda-card>.mandalo-confirm-destination-head{grid-column:2;grid-row:1;align-self:center}

/* Diálogo de agenda: hoja inferior en celular, ventana centrada en escritorio. */
.mdx-agenda-dialog{width:min(560px,calc(100vw - 32px));max-width:560px;max-height:min(720px,calc(100vh - 32px));margin:auto;padding:0;border:0;border-radius:24px;background:#fff;color:#1e2a44;font-family:Outfit,system-ui,sans-serif;font-size:16px;line-height:1.5;box-shadow:0 18px 48px rgba(30,42,68,.22);overflow:hidden}
.mdx-agenda-dialog::backdrop{background:rgba(30,42,68,.48)}
.mdx-agenda-sheet{display:flex;flex-direction:column;gap:16px;max-height:inherit;padding:20px;overflow:auto;box-sizing:border-box}
.mdx-agenda-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.mdx-agenda-title{margin:0;font-family:Lexend,system-ui,sans-serif;font-size:20px;font-weight:600;line-height:1.3;color:#1e2a44}
.mdx-agenda-for{margin:4px 0 0;font-size:14px;color:#526685}
.mdx-agenda-close{flex:0 0 44px;width:44px;height:44px;margin:0;padding:0;border:1px solid #dce5f2;border-radius:999px;background:#fff;color:#1e2a44;font-size:24px;line-height:1;cursor:pointer}
.mdx-agenda-search-wrap label{display:block;margin:0 0 8px;font-weight:500;color:#1e2a44}
.mdx-agenda-search{width:100%;min-height:52px;padding:12px 14px;border:1px solid #7185a3;border-radius:12px;background:#fff;color:#1e2a44;font:inherit;box-sizing:border-box}
.mdx-agenda-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.mdx-agenda-list li{margin:0;padding:0}
.mdx-agenda-item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:56px;margin:0;padding:12px 16px;border:1px solid #dce5f2;border-radius:16px;background:#fff;color:#1e2a44;font:inherit;text-align:left;cursor:pointer;box-shadow:none}
.mdx-agenda-item:hover{border-color:#205abb;background:#eef4ff}
.mdx-agenda-item[aria-current="true"]{border-color:#205abb;background:#eef4ff}
.mdx-agenda-item-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.mdx-agenda-item-text strong{font-weight:600;color:#1e2a44;overflow-wrap:anywhere}
.mdx-agenda-item-line{font-size:14px;color:#1e2a44;overflow-wrap:anywhere}
.mdx-agenda-item-muted{color:#526685}
.mdx-agenda-badge{flex:0 0 auto;padding:4px 10px;border-radius:999px;background:#eef4ff;color:#205abb;font-size:14px;font-weight:500;white-space:nowrap}
.mdx-agenda-empty{margin:0;padding:16px;border-radius:16px;background:#f4f7ff;color:#1e2a44}
.mdx-agenda-alt,.mdx-agenda-manage-actions{display:flex;flex-direction:column;gap:8px}
.mdx-agenda-alt:empty{display:none}
.mdx-agenda-primary,.mdx-agenda-secondary,.mdx-agenda-danger{width:100%;min-height:48px;margin:0;padding:10px 20px;border-radius:999px;font:inherit;font-weight:500;cursor:pointer;white-space:normal;box-shadow:none}
.mdx-agenda-primary{border:1px solid #205abb;background:#205abb;color:#fff}
.mdx-agenda-primary:hover{background:#184ca4}
.mdx-agenda-secondary{border:1px solid #205abb;background:#fff;color:#205abb}
.mdx-agenda-secondary:hover{background:#eef4ff}
.mdx-agenda-danger{border:1px solid #802138;background:#fff;color:#802138}
.mdx-agenda-manage{border-top:1px solid #dce5f2;padding-top:12px}
.mdx-agenda-manage summary{min-height:44px;display:flex;align-items:center;font-weight:500;color:#205abb;cursor:pointer}
.mdx-agenda-manage-actions{margin-top:8px}
.mdx-agenda-status{margin:0;font-size:14px;color:#526685}
.mdx-agenda-status:empty{display:none}
.mdx-agenda-dialog :focus-visible{outline:3px solid #205abb;outline-offset:3px}
.mdx-agenda-dialog [hidden]{display:none!important}

/* Secciones plegables: el encabezado sólo existe en celular. */
.mdx-fold-head{display:none}
.mdx-prefill-note{margin:0 0 16px;padding:12px 16px;border-radius:16px;background:#eef4ff;color:#1e2a44;font-size:14px;line-height:1.5}

@media (max-width:800px){
    .mdx-agenda-dialog{width:100vw;max-width:100vw;max-height:88vh;margin:auto 0 0;border-radius:24px 24px 0 0}
    .mdx-agenda-sheet{padding:20px 16px calc(20px + env(safe-area-inset-bottom,0px))}

    .mdx-fold{position:relative}
    .mdx-fold-head{display:flex;align-items:center;gap:12px;flex:1 0 100%;grid-column:1/-1;order:-1;width:100%;min-height:56px;margin:0 0 12px;padding:12px 16px;border:1px solid #dce5f2;border-radius:16px;background:#fff;color:#1e2a44;font-family:Outfit,system-ui,sans-serif;font-size:16px;line-height:1.4;text-align:left;cursor:pointer;box-shadow:none;box-sizing:border-box}
    .mdx-fold-head:focus-visible{outline:3px solid #205abb;outline-offset:3px}
    .mdx-fold-status{flex:0 0 28px;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:2px solid #7185a3;border-radius:999px;background:#fff;color:#fff;box-sizing:border-box}
    .mdx-fold.is-complete .mdx-fold-status{border-color:#0f5132;background:#0f5132}
    .mdx-fold-text{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
    .mdx-fold-title{font-family:Lexend,system-ui,sans-serif;font-weight:600;font-size:16px;color:#1e2a44}
    .mdx-fold-summary{font-size:14px;color:#526685;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
    .mdx-fold-state{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;font-size:14px;font-weight:500;color:#205abb}
    .mdx-fold-state svg{transition:transform .2s ease}
    .mdx-fold:not(.is-closed) .mdx-fold-state svg{transform:rotate(180deg)}
    .mdx-fold.is-closed{padding-bottom:0}
    .mdx-fold.is-closed>.mdx-fold-head{margin-bottom:0}
    .mdx-fold.is-complete.is-closed>.mdx-fold-head{background:#eff9f4;border-color:#b9dcc8}
    /* Plegado: sólo el encabezado con su resumen. Lo incompleto o inválido vuelve a abrirse solo. */
    .mdx-fold.is-closed>:not(.mdx-fold-head){display:none!important}
    /* El encabezado repite el título; el original queda para lectores de pantalla y su label sigue ligado al campo. */
    .mdx-fold>.mdx-fold-native-title{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;white-space:nowrap!important;border:0!important}
}
@media (max-width:800px) and (prefers-reduced-motion:reduce){
    .mdx-fold-state svg{transition:none}
}

/* Hotfix 14-nov-2026 (Claude M4): en PC el tema (Elementor/Hello) colapsaba el SVG a 0 px y
   pintaba el botón con borde negro: se veía un cuadro vacío junto a la dirección. */
.mdx-agenda-btn {
  color: #205abb !important;
  border-color: #c9d6ee !important;
  background: #fff !important;
  padding: 0 !important;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.mdx-agenda-btn svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  flex: 0 0 22px !important;
  stroke: currentColor !important;
}

/* Guía de diseño Mándalo §4–5 (14-nov-2026): el tema (Elementor/Hello) aplicaba a estos
   botones su estilo genérico —borde negro grueso, esquinas rectas y sombra amarilla
   desplazada—, prohibido por la guía. Se fija la apariencia de tarjeta/acción de Mándalo. */
#mandalo-checkout-container .mdx-fold-head,
#mandalo-quote-container .mdx-fold-head,
.mdx-fold-head {
  border: 1px solid #dce5f2 !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #1e2a44 !important;
  box-shadow: none !important;
  transform: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: Outfit, system-ui, sans-serif !important;
  font-weight: 500 !important;
}
.mdx-fold-head:hover, .mdx-fold-head:active { background: #f4f7ff !important; border-color: #b9c9e4 !important; box-shadow: none !important; transform: none !important; }
.mdx-fold.is-complete.is-closed > .mdx-fold-head { background: #eff9f4 !important; border-color: #b9dcc8 !important; }
.mdx-fold-head .mdx-fold-title { color: #1e2a44 !important; font-family: Lexend, Outfit, system-ui, sans-serif !important; font-weight: 600 !important; }
.mdx-fold-head .mdx-fold-summary, .mdx-fold-head .mdx-fold-text small { color: #526685 !important; }
.mdx-fold-head .mdx-fold-state { color: #205abb !important; }
.mdx-fold-status { border-width: 2px !important; box-shadow: none !important; }

#mandalo-checkout-container .mdx-agenda-btn,
#mandalo-quote-container .mdx-agenda-btn,
.mdx-agenda-btn {
  border: 1px solid #7185a3 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #205abb !important;
  box-shadow: none !important;
  transform: none !important;
  width: 52px !important; min-width: 52px !important; height: 52px !important; min-height: 52px !important;
  padding: 0 !important;
}
.mdx-agenda-btn:hover, .mdx-agenda-btn:active { background: #eef4ff !important; border-color: #205abb !important; box-shadow: none !important; transform: none !important; }
/* Encabezado plegable: el tema centra y no deja saltar línea; el título chocaba con «Ocultar». */
.mdx-fold-head { justify-content: flex-start !important; text-align: left !important; white-space: normal !important; height: auto !important; line-height: 1.4 !important; }
.mdx-fold-head .mdx-fold-text { flex: 1 1 auto !important; min-width: 0 !important; display: flex; flex-direction: column; gap: 2px; text-align: left !important; }
.mdx-fold-head .mdx-fold-title, .mdx-fold-head .mdx-fold-summary { display: block; white-space: normal !important; overflow-wrap: anywhere; }
.mdx-fold-head .mdx-fold-title { font-size: 18px !important; line-height: 1.3 !important; }
.mdx-fold-head .mdx-fold-summary { font-size: 14px !important; line-height: 1.4 !important; }
.mdx-fold-head .mdx-fold-state { flex: 0 0 auto !important; margin-left: auto !important; padding-left: 8px; white-space: nowrap !important; }
/* Indicador pendiente: anillo tenue (progreso), no un radio. Completo: verde con palomita. */
.mdx-fold-status { flex: 0 0 24px !important; width: 24px !important; height: 24px !important; border: 2px dashed #b9c9e4 !important; }
.mdx-fold.is-complete .mdx-fold-status { border: 2px solid #0f5132 !important; background: #0f5132 !important; }
.mdx-fold-head { padding: 12px 16px !important; gap: 12px !important; min-height: 56px !important; }
/* Ventana de agenda (remitente/destinos) según la Guía de diseño v1.0.0.
   El kit de Elementor (.elementor-kit-N button / h2, especificidad 0,1,1) le ponía borde negro,
   esquinas de 1 px, sombra amarilla desplazada y 15 px a los contactos y a «Cerrar».
   Se sube la especificidad dentro del diálogo (0,2,1 / 0,3,1), sin !important ni reset global. */
dialog.mdx-agenda-dialog h2.mdx-agenda-title{margin:0;font-family:Lexend,Outfit,system-ui,sans-serif;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;text-transform:none;color:#1e2a44}
dialog.mdx-agenda-dialog p.mdx-agenda-for{margin:4px 0 0;font-family:Outfit,system-ui,sans-serif;font-size:14px;line-height:1.5;color:#526685}
dialog.mdx-agenda-dialog button.mdx-agenda-close{flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dce5f2;border-radius:999px;background:#fff;color:#1e2a44;font-family:Outfit,system-ui,sans-serif;font-size:24px;font-weight:400;line-height:1;box-shadow:none;transform:none;text-transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-close:hover,dialog.mdx-agenda-dialog button.mdx-agenda-close:active{border-color:#205abb;background:#eef4ff;color:#205abb;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:56px;margin:0;padding:12px 16px;border:1px solid #dce5f2;border-radius:16px;background:#fff;color:#1e2a44;font-family:Outfit,system-ui,sans-serif;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:0;text-align:left;text-transform:none;white-space:normal;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-item:hover,dialog.mdx-agenda-dialog button.mdx-agenda-item:active,dialog.mdx-agenda-dialog button.mdx-agenda-item[aria-current="true"]{border-color:#205abb;background:#eef4ff;color:#1e2a44;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-item strong{font-weight:600;color:#1e2a44}
dialog.mdx-agenda-dialog button.mdx-agenda-primary,dialog.mdx-agenda-dialog button.mdx-agenda-secondary,dialog.mdx-agenda-dialog button.mdx-agenda-danger{width:100%;min-height:48px;margin:0;padding:10px 20px;border-radius:999px;font-family:Outfit,system-ui,sans-serif;font-size:16px;font-weight:500;line-height:1.4;text-transform:none;white-space:normal;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-primary{border:1px solid #205abb;background:#205abb;color:#fff}
dialog.mdx-agenda-dialog button.mdx-agenda-primary:hover,dialog.mdx-agenda-dialog button.mdx-agenda-primary:active{border-color:#184ca4;background:#184ca4;color:#fff;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-secondary{border:1px solid #205abb;background:#fff;color:#205abb}
dialog.mdx-agenda-dialog button.mdx-agenda-secondary:hover,dialog.mdx-agenda-dialog button.mdx-agenda-secondary:active{background:#eef4ff;color:#205abb;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog button.mdx-agenda-danger{border:1px solid #802138;background:#fff;color:#802138}
dialog.mdx-agenda-dialog button.mdx-agenda-danger:hover,dialog.mdx-agenda-dialog button.mdx-agenda-danger:active{background:#fdf0f2;color:#802138;box-shadow:none;transform:none}
dialog.mdx-agenda-dialog input.mdx-agenda-search{width:100%;min-height:52px;padding:12px 14px;border:1px solid #7185a3;border-radius:12px;background:#fff;color:#1e2a44;font-family:Outfit,system-ui,sans-serif;font-size:16px;box-shadow:none}
dialog.mdx-agenda-dialog .mdx-agenda-manage summary{font-family:Outfit,system-ui,sans-serif;font-size:16px;color:#205abb}
dialog.mdx-agenda-dialog button:focus-visible,dialog.mdx-agenda-dialog input:focus-visible,dialog.mdx-agenda-dialog summary:focus-visible{outline:3px solid #205abb;outline-offset:3px;box-shadow:none}
/* «+ Agregar destino»: botón secundario de la guía (antes 39 px y borde #ABC1DF sin contraste 3:1). */
#mandalo-quote-container button.mandalo-add-btn{min-height:48px;padding:12px 20px;border:1px solid #205abb;border-style:solid;border-radius:999px;background:#fff;color:#205abb;font-family:Outfit,system-ui,sans-serif;font-size:16px;font-weight:500;line-height:1.4;box-shadow:none;transform:none}
#mandalo-quote-container button.mandalo-add-btn:hover,#mandalo-quote-container button.mandalo-add-btn:active{background:#eef4ff;border-color:#205abb;color:#205abb;box-shadow:none;transform:none}
/* «Para continuar falta» (Dan, 18-nov): aviso de error de la guía y campo marcado. */
#mandalo-quote-container .mdx-missing{margin:0 0 16px;padding:16px;border:1px solid #F4B9B9;border-radius:16px;background:#FFF5F5;color:#7A1F1F;font-family:Outfit,system-ui,sans-serif;font-size:16px;line-height:1.5}
#mandalo-quote-container .mdx-missing-title{margin:0 0 8px;font-weight:600;color:#7A1F1F}
#mandalo-quote-container .mdx-missing-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px}
#mandalo-quote-container .mdx-missing-list li{margin:0;padding:0}
#mandalo-quote-container button.mdx-missing-link{display:flex;align-items:center;width:100%;min-height:44px;margin:0;padding:8px 0;border:0;border-radius:0;background:transparent;color:#7A1F1F;font-family:inherit;font-size:16px;font-weight:500;line-height:1.4;text-align:left;text-decoration:underline;text-underline-offset:3px;white-space:normal;box-shadow:none;transform:none;cursor:pointer}
#mandalo-quote-container button.mdx-missing-link:hover{color:#5C1414;background:transparent}
#mandalo-quote-container button.mdx-missing-link:focus-visible{outline:3px solid #205ABB;outline-offset:2px}
#mandalo-quote-container .mdx-missing-field:not(div){border-color:#B42318 !important;box-shadow:0 0 0 1px #B42318 !important}
#mandalo-quote-container div.mdx-missing-field{outline:2px solid #B42318;outline-offset:6px;border-radius:12px}
#mandalo-quote-container button.mdx-incomplete[aria-disabled="true"]{opacity:.6;cursor:pointer}
