/* «Mi sitio de servicios» (JC, 19 y 20 nov 2026): crear el sitio, «¿Qué
   quieres crear?» y su panel por pasos. Pensado primero para el celular. */

/* --- ¿Qué quieres crear? --------------------------------------------------- */
.cq-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; margin: 18px 0; }
.cq-opcion { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(20, 24, 52, .08); color: #252B60; text-decoration: none; border: 2px solid transparent; }
.cq-opcion:hover, .cq-opcion:focus-visible { border-color: #252B60; }
.cq-opcion strong { font-size: 19px; }
.cq-opcion span { color: #4a5368; line-height: 1.5; }
.cq-opcion .cq-ir { margin-top: auto; color: #0F55DB; font-weight: 700; }
.cq-suelto { text-align: center; }

/* --- Crear el sitio ------------------------------------------------------------ */
.ms-crear { max-width: 720px; margin: 0 auto; padding: 18px 16px 40px; }
.ms-crear h1 { margin: 6px 0 4px; font-size: 26px; color: #252B60; }
.ms-crear-sub { margin: 0 0 18px; color: #4a5368; line-height: 1.5; }
.ms-crear-form { display: flex; flex-direction: column; gap: 18px; }
.ms-paso { border: 0; margin: 0; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(20, 24, 52, .08); display: flex; flex-direction: column; gap: 12px; }
.ms-paso legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: #252B60; margin-bottom: 4px; }
.ms-paso-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #252B60; color: #fff; font-size: 14px; }
.ms-oficios { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ms-oficio { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 14px; background: #f4f6fb; color: #252B60; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; border: 2px solid transparent; }
.ms-oficio input { position: absolute; opacity: 0; pointer-events: none; }
.ms-oficio:has(input:checked) { border-color: #252B60; background: #eef0f8; }
.ms-oficio:has(input:focus-visible) { outline: 3px solid #0b5ed7; outline-offset: 2px; }
.ms-regla { margin: 0; font-size: 13.5px; line-height: 1.5; color: #5d6577; }
.ms-alerta { background: #FFF4CC; color: #5B4300; border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.ms-boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: #252B60; color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; }
.ms-boton:disabled { opacity: .5; cursor: default; }
.ms-crear-boton { align-self: stretch; }

/* --- El panel ------------------------------------------------------------------- */
.ms-cual { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #e4e7ee; color: #252B60; }
.ms-cual strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-pill { flex: none; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #FFF4CC; color: #5B4300; }
.ms-pill-si { background: #E3F6E8; color: #1E6B35; }
.ms-estado-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ms-direccion { font-weight: 600; word-break: break-all; }
.ms-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ms-acciones form { margin: 0; }
.ms-secundario { background: #fff; color: #252B60; box-shadow: inset 0 0 0 1.5px #c9cde6; text-decoration: none; }
.ms-atajos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ms-atajo { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: #f4f6fb; color: #252B60; text-decoration: none; font-weight: 700; }
.ms-atajo span { font-weight: 400; font-size: 13px; color: #5d6577; }
.ms-form { display: flex; flex-direction: column; gap: 12px; }
.ms-campo { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.ms-campo > span:first-child { font-weight: 600; color: #3B4357; }
.ms-campo small { font-weight: 400; color: #6B7280; }
.ms-campo input[type=text], .ms-campo input[type=url], .ms-campo input[type=number], .ms-campo textarea, .ms-campo select {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid #d5d9e4; border-radius: 10px; background: #fff;
}
.ms-campo textarea { resize: vertical; }
.ms-corto { max-width: 280px; }
.ms-prefijo { display: flex; align-items: center; border: 1.5px solid #d5d9e4; border-radius: 10px; overflow: hidden; background: #fff; }
.ms-prefijo > span { padding: 10px 0 10px 12px; color: #6B7280; white-space: nowrap; }
.ms-prefijo input { border: 0 !important; padding-left: 2px !important; min-width: 0; width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; outline: none; }
.ms-fila { display: flex; flex-wrap: wrap; gap: 12px; }
.ms-fila > .ms-campo { flex: 1 1 160px; }
.ms-color input[type=color] { width: 100%; height: 44px; border: 1.5px solid #d5d9e4; border-radius: 10px; padding: 3px; background: #fff; }
.ms-check { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.ms-check input { width: 20px; height: 20px; }
.ms-paletas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ms-paleta { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 14px; background: #F4F6F9; font-size: 14px; font-weight: 600; color: #252B60; cursor: pointer; border: 2px solid transparent; }
.ms-paleta:has(input:checked) { border-color: #252B60; background: #eef0f8; }
.ms-paleta input { position: absolute; opacity: 0; pointer-events: none; }
.ms-paleta:has(input:focus-visible) { outline: 3px solid #0b5ed7; outline-offset: 2px; }
.ms-muestra { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.ms-plegado { border-radius: 14px; background: #F7F8FB; padding: 0 14px; }
.ms-plegado > summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: #252B60; }
.ms-plegado[open] { padding-bottom: 14px; }
.ms-iconos { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ms-iconos legend { font-weight: 600; font-size: 14px; color: #3B4357; margin-bottom: 6px; }
.ms-icono { position: relative; display: flex; align-items: center; gap: 6px; padding: 10px; border-radius: 12px; background: #F4F6F9; font-size: 13px; cursor: pointer; border: 2px solid transparent; }
.ms-icono input { position: absolute; opacity: 0; pointer-events: none; }
.ms-icono:has(input:checked) { background: #252B60; color: #fff; }
.ms-icono:has(input:focus-visible) { outline: 3px solid #0b5ed7; outline-offset: 2px; }
.ms-opciones-radio { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ms-opciones-radio legend { font-weight: 600; font-size: 14px; color: #3B4357; margin-bottom: 6px; }
.ms-secciones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ms-seccion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #F4F6F9; }
.ms-oculta { opacity: .65; }
.ms-seccion-nombre { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-seccion-nombre a { font-weight: 700; color: #252B60; text-decoration: none; }
.ms-seccion-estado { font-size: 12.5px; color: #6B7280; }
.ms-seccion-botones { display: flex; align-items: center; gap: 6px; }
.ms-seccion-botones form { display: flex; gap: 6px; margin: 0; }
.ms-mini { all: unset; cursor: pointer; min-width: 40px; height: 40px; padding: 0 8px; box-sizing: border-box; display: inline-grid; place-items: center; border-radius: 10px; background: #fff; font-size: 15px; font-weight: 700; color: #252B60; box-shadow: inset 0 0 0 1.5px #d5d9e4; text-decoration: none; }
.ms-mini:disabled { opacity: .35; cursor: default; }
.ms-mini:focus-visible { outline: 3px solid #0b5ed7; outline-offset: 2px; }
.ms-mini-texto { font-size: 13.5px; padding: 0 12px; }
.ms-volver { display: inline-block; margin-bottom: 6px; font-weight: 600; color: #252B60; text-decoration: none; }
.ms-aviso-vacia { background: #FFF4CC; color: #5B4300; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.ms-lista { border: 0; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ms-lista legend { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.ms-fila-lista { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: #F7F8FB; box-shadow: inset 0 0 0 1px #E4E7EE; }
.ms-fila-nueva { background: #fff; box-shadow: inset 0 0 0 1.5px #d5d9e4; }
.ms-fila-cabeza { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.ms-foto-fila { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ms-foto-caja { width: 120px; flex: none; border-radius: 10px; overflow: hidden; background: #E4E7EE; display: block; }
.ms-foto-caja img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-foto-botones { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.ms-foto-botones input[type=file] { max-width: 100%; }
/* Guardar y volver al final del formulario: en su lugar, nunca encima de un campo (JC, 20 nov 2026). */
.ms-guardar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 0 4px; margin-top: 4px; border-top: 1px solid #eef0f4; }
.ms-guardar .sc-boton { width: auto; flex: 1 1 auto; max-width: 260px; }
.ms-enlace { font-weight: 600; color: #252B60; }
.ms-vistas { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ms-vista { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.ms-vista figcaption { font-weight: 700; color: #3B4357; }
.ms-vista-pc { flex: 1 1 520px; }
.ms-vista-pc .ms-vista-marco { --k: .5; width: 100%; height: calc(820px * var(--k)); overflow: hidden; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); background: #fff; }
.ms-vista-pc iframe { width: 1280px; height: 820px; border: 0; transform: scale(var(--k)); transform-origin: 0 0; }
.ms-vista-cel .ms-vista-marco { width: 375px; max-width: 100%; height: 740px; overflow: hidden; border-radius: 28px; box-shadow: 0 0 0 8px #11152A, 0 10px 30px rgba(0,0,0,.2); background: #fff; }
.ms-vista-cel iframe { width: 375px; max-width: 100%; height: 740px; border: 0; }

/* --- La vista previa en vivo (JC, 20 nov 2026) --------------------------------
   El esqueleto del diseño de la tienda (.ed de editor-tienda.css): el formulario
   en medio, pegado al menú, y el sitio a la derecha, más ancho que el de la tienda
   porque es un sitio completo. Más angosto que 1200 px no hay columna: «Ver cómo
   queda» (fijo abajo) lo abre a pantalla completa. */
.ms-ed { padding-top: 4px; }
.ms-ed-cabeza { display: flex; flex-direction: column; gap: 2px; }
.ms-ed .ed-trabajo { gap: 14px; }
.ms-ed .ed-trabajo > .sc-caja, .ms-ed .ed-trabajo > form { margin-bottom: 0; }
.ms-volver-form { display: none; }
@media (min-width: 1200px) {
    .pv-diseno .ms-ed.ed { grid-template-columns: minmax(0, 1fr) clamp(420px, 38vw, 640px); gap: 24px; }
}
@media (max-width: 1199px) {
    /* Fijo abajo, siempre a mano; el formulario deja su espacio al final. */
    .ms-ed .ms-ver { position: fixed; z-index: 60; right: 16px; bottom: 16px; margin: 0; box-shadow: rgba(0,0,0,.22) 0 8px 22px; }
    .ms-ed .ed-trabajo { padding-bottom: 72px; }
    /* A pantalla completa, también en la tablet, con «Volver al formulario» abajo. */
    .ms-ed .ed-vista { left: 0; right: 0; width: auto; box-shadow: none; padding-bottom: 12px; }
    .ms-ed .ms-volver-form { display: inline-flex; flex: none; }
    .ms-ed.ed-vista-abierta .ms-ver { display: none; }
}
/* Con el formulario más angosto, las cuadrículas bajan de columnas sin cortar nada. */
.ms-ed .ms-paletas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.ms-ed .ms-paleta { min-width: 0; }
.ms-ed .ms-paleta > span:last-child { overflow-wrap: anywhere; }
.ms-ed .ms-iconos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); }
.ms-ed .ms-icono { min-width: 0; }
.ms-ed .ms-icono > span { overflow-wrap: anywhere; }
.ms-ed .ms-opciones-radio { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.ms-ed .ms-fila > .ms-campo { flex: 1 1 150px; min-width: 0; }
/* Secciones: el nombre arriba y los botones abajo si no caben al lado; nunca montados. */
.ms-ed .ms-seccion { align-items: flex-start; }
.ms-ed .ms-seccion-nombre { flex: 1 1 180px; }
.ms-ed .ms-seccion-botones { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
.ms-ed .ms-seccion-botones form { flex-wrap: wrap; }

/* Lo de ejemplo (20 nov 2026): el campo con texto guía se ve distinto hasta que se cambie. */
.ms-ejemplo input[type=text], .ms-ejemplo input[type=number], .ms-ejemplo textarea { background: #FFF8E1; border-color: #E8B931; color: #6B5A1E; font-style: italic; }
.ms-ej-etiqueta { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #FFE9A8; color: #6B4E00; font-size: 11.5px; font-style: normal; font-weight: 700; vertical-align: 1px; }
.ms-foto.ms-ejemplo .ms-foto-caja { outline: 2px dashed #E8B931; outline-offset: 2px; }
.ms-cambiar-foto { align-self: flex-start; }
.ms-cambiar-foto + input[type=file] { font-size: 13px; }
/* Publicar: lo que falta, por sección. */
.ms-progreso { height: 8px; border-radius: 999px; background: #E4E7EE; overflow: hidden; margin: 8px 0 4px; }
.ms-progreso > span { display: block; height: 100%; background: #2E7D32; border-radius: inherit; }
.ms-faltan { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ms-falta { border: 1px solid #E4E7EE; border-radius: 12px; padding: 14px; background: #fff; }
.ms-falta h3 { margin: 0 0 6px; font-size: 16px; }
.ms-falta ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; color: #3B4357; }
.ms-falta-botones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ms-falta-botones form { margin: 0; }
