/* Vigente · demo web (chat que imita WhatsApp) y portal de ejemplo. Requiere base.css y sitio.css. */

.franja-demo { background: var(--ambar-500, #F2A541); color: var(--verde-950, #072A20); font-size: 14px; }
.franja-demo .contenedor { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; justify-content: center; min-height: 36px; padding-top: 6px; padding-bottom: 6px; text-align: center; }
.franja-demo strong { font-weight: 800; letter-spacing: .01em; }

.demo { padding: 24px 0 64px; }
@media (min-width: 960px) { .demo { padding: 44px 0 88px; } }
.incrustada .demo { padding: 12px 0; }

/* Pestañas */
.pestanas { display: flex; gap: 6px; margin: 20px 0 16px; padding: 4px; background: var(--verde-50, #F1F7F3); border: 1px solid var(--verde-100, #E4F1EA); border-radius: 999px; width: 100%; max-width: 560px; }
.pestana { flex: 1 1 0; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--verde-800, #0F4A39); font: 700 15px/1.2 var(--f-ui, sans-serif); cursor: pointer; }
.pestana[aria-selected="true"] { background: var(--verde-700, #16624B); color: var(--blanco, #fff); box-shadow: var(--sombra-1, none); }
.pestana:focus-visible { outline: 3px solid var(--ambar-500, #F2A541); outline-offset: 2px; }

.demo-rejilla { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1000px) { .demo-rejilla { grid-template-columns: 420px minmax(0, 1fr); gap: 56px; } }
.demo-lado h2 { font-family: var(--f-display, Georgia, serif); font-weight: 600; font-size: 28px; margin: 8px 0 14px; }
.lista-check { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.lista-check li { position: relative; padding-left: 32px; color: var(--tinta-2, #4B5B54); }
.lista-check li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--verde-100, #E4F1EA) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%2316624B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Teléfono */
.telefono { position: relative; display: flex; flex-direction: column; height: min(640px, calc(100svh - 150px)); min-height: 460px; width: 100%; max-width: 420px; margin: 0 auto; background: #EFE7DC; border: 8px solid var(--verde-950, #072A20); border-radius: 30px; overflow: hidden; box-shadow: var(--sombra-2, 0 10px 30px rgba(0,0,0,.15)); }
@media (max-width: 480px) { .telefono { border-width: 0; border-radius: 16px; height: calc(100svh - 170px); } }
.incrustada .telefono { height: min(620px, calc(100svh - 110px)); }
.tel-barra { display: flex; align-items: center; gap: 10px; background: var(--verde-800, #0F4A39); color: var(--blanco, #fff); padding: 12px 12px 10px; flex: none; }
.tel-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--verde-950, #072A20); display: grid; place-items: center; flex: none; }
.tel-quien { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.tel-quien strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tel-quien small { font-size: 12px; color: #BFD6CB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tel-quien small.escribe { color: var(--ambar-400, #F6BD6E); font-style: italic; }
.tel-reiniciar { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--blanco, #fff); cursor: pointer; display: grid; place-items: center; flex: none; }
.tel-reiniciar:hover { background: rgba(255,255,255,.12); }
.tel-reiniciar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tel-chat { flex: 1; overflow-y: auto; padding: 12px 10px 8px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.tel-hoy { align-self: center; margin: 0 0 4px; padding: 3px 10px; border-radius: 8px; background: #E1F2FB; color: #54656F; font-size: 12px; font-weight: 600; }
.tel-nota { align-self: center; max-width: 92%; margin: 0 0 6px; padding: 7px 10px; border-radius: 8px; background: #FFF3C4; color: #54656F; font-size: 12.5px; line-height: 1.4; text-align: center; }
.tel-nota a { color: #54656F; font-weight: 700; }

.grupo-burbuja { display: flex; flex-direction: column; max-width: 86%; }
.grupo-burbuja.entra { align-self: flex-start; }
.grupo-burbuja.sale { align-self: flex-end; }
.burbuja { position: relative; margin: 0; padding: 7px 10px 18px; border-radius: 10px; font-size: 14.5px; line-height: 1.42; color: #111B21; box-shadow: 0 1px .5px rgba(11,20,26,.13); overflow-wrap: anywhere; white-space: normal; }
.entra .burbuja { background: var(--blanco, #fff); border-top-left-radius: 3px; }
.sale .burbuja { background: #D9FDD3; border-top-right-radius: 3px; padding-right: 48px; }
.burbuja .hora { position: absolute; right: 8px; bottom: 3px; font-size: 11px; color: #667781; }
.burbuja a { color: #027EB5; word-break: break-all; }
.burbuja.sistema { background: #FFF3C4; }
.tarjeta-enlace { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 9px 10px; border-radius: 8px; background: var(--verde-50, #F1F7F3); color: var(--verde-800, #0F4A39); font-weight: 700; font-size: 14px; text-decoration: none; }
.tarjeta-enlace svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tarjeta-enlace:hover { background: var(--verde-100, #E4F1EA); }

.botones-wa { display: grid; gap: 2px; margin-top: 2px; }
.boton-wa { min-height: 42px; border: 0; border-radius: 10px; background: var(--blanco, #fff); color: #027EB5; font: 600 14.5px/1.2 var(--f-ui, sans-serif); cursor: pointer; box-shadow: 0 1px .5px rgba(11,20,26,.13); padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.boton-wa:hover:not(:disabled) { background: #F5F6F6; }
.boton-wa:disabled { color: #8696A0; cursor: default; }
.boton-wa svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.escribiendo .burbuja { padding: 12px 14px; }
.puntos { display: inline-flex; gap: 4px; }
.puntos i { width: 7px; height: 7px; border-radius: 50%; background: #8696A0; animation: salto 1.2s infinite ease-in-out; }
.puntos i:nth-child(2) { animation-delay: .15s; }
.puntos i:nth-child(3) { animation-delay: .3s; }
@keyframes salto { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .puntos i { animation: none; } }

.tel-sugerencias { display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px 2px; flex: none; scrollbar-width: none; }
.tel-sugerencias::-webkit-scrollbar { display: none; }
.tel-sugerencias[hidden] { display: none; }
.sugerencia { flex: none; min-height: 36px; padding: 6px 12px; border: 1px solid #D1D7DB; border-radius: 999px; background: var(--blanco, #fff); color: var(--verde-800, #0F4A39); font: 600 13.5px/1.2 var(--f-ui, sans-serif); cursor: pointer; white-space: nowrap; }
.sugerencia:hover { border-color: var(--verde-700, #16624B); }

.tel-escribir { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; flex: none; }
.tel-escribir input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--blanco, #fff); font: 500 16px/1.2 var(--f-ui, sans-serif); color: #111B21; }
.tel-escribir input:focus { outline: 2px solid var(--verde-600, #1E7A5E); }
.tel-escribir button { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: var(--verde-700, #16624B); color: var(--blanco, #fff); cursor: pointer; display: grid; place-items: center; }
.tel-escribir button:disabled { background: #8FB5A7; cursor: default; }
.tel-escribir button svg { width: 20px; height: 20px; fill: currentColor; }

/* Hoja de opciones (lista de WhatsApp) */
.tel-hoja { position: absolute; inset: 0; background: rgba(11,20,26,.4); display: flex; align-items: flex-end; z-index: 5; }
.tel-hoja[hidden] { display: none; }
.hoja-caja { width: 100%; max-height: 75%; overflow-y: auto; background: var(--blanco, #fff); border-radius: 16px 16px 0 0; padding: 8px 0 12px; }
.hoja-cabeza { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 10px; border-bottom: 1px solid #E9EDEF; }
.hoja-cabeza button { width: 36px; height: 36px; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: #54656F; }
.hoja-filas { list-style: none; padding: 0; margin: 0; }
.hoja-filas button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #F0F2F5; background: none; padding: 12px 16px; cursor: pointer; font: 600 15px/1.3 var(--f-ui, sans-serif); color: #111B21; }
.hoja-filas button small { display: block; font-weight: 500; font-size: 13px; color: #667781; margin-top: 2px; }
.hoja-filas button:hover { background: #F5F6F6; }

/* Portal de ejemplo */
.cab-portal { background: var(--blanco, #fff); border-bottom: 1px solid var(--linea, #DCE4DF); }
.cab-portal .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.cab-portal-marca { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--verde-800, #0F4A39); }
.cab-portal-colegio { font-size: 13px; color: var(--tinta-3, #5F6E67); }
.portal-demo { padding: 24px 0 64px; }
.contenedor-portal { max-width: calc(680px + 2 * var(--gutter, 16px)); }
.titulo-portal { font-family: var(--f-display, Georgia, serif); font-weight: 600; font-size: clamp(28px, 6vw, 38px); margin: 6px 0 4px; }
.caja-fecha { background: var(--verde-800, #0F4A39); color: #E4F1EA; border-radius: var(--r-m, 16px); padding: 18px 20px; margin: 18px 0 12px; }
.caja-fecha p { margin: 0 0 6px; font-size: 17px; }
.caja-fecha .nota { color: #BFD6CB; font-size: 13px; margin: 0; }
.caja-fecha-etiqueta { font-size: 12px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ambar-400, #F6BD6E); }
.caja-via { background: var(--blanco, #fff); border: 1px solid var(--linea, #DCE4DF); border-radius: var(--r-s, 10px); padding: 12px 16px; font-size: 15px; }
.caja-via p { margin: 0; }
.progreso { margin: 20px 0 10px; }
.progreso p { margin: 0 0 6px; font-size: 15px; }
.barra { height: 8px; border-radius: 4px; background: var(--linea, #DCE4DF); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--verde-600, #1E7A5E); transition: width .4s; }
.aviso-verde { background: var(--verde-50, #F1F7F3); border-color: var(--verde-200, #CFE5DA); color: var(--verde-900, #0B3A2D); }
.checklist { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 10px; }
.doc-fila { background: var(--blanco, #fff); border: 1px solid var(--linea, #DCE4DF); border-left: 5px solid var(--linea, #DCE4DF); border-radius: var(--r-s, 10px); padding: 14px 16px; }
.doc-fila.estado-ok { border-left-color: var(--verde-600, #1E7A5E); }
.doc-fila.estado-problema { border-left-color: #D97706; }
.doc-fila.estado-revisando { border-left-color: var(--ambar-500, #F2A541); }
.doc-cabeza { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.doc-nombre { font-weight: 700; }
.doc-nombre small { font-weight: 500; color: var(--tinta-3, #5F6E67); }
.doc-estado { flex: none; font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #EEF1EF; color: var(--tinta-2, #4B5B54); }
.estado-ok .doc-estado { background: var(--verde-100, #E4F1EA); color: var(--verde-800, #0F4A39); }
.estado-problema .doc-estado { background: #FDF0E0; color: #8A4B06; }
.estado-revisando .doc-estado { background: var(--ambar-100, #FDF1DE); color: var(--ambar-700, #9A5B0B); }
.doc-mensaje { margin: 8px 0 0; font-size: 15px; color: var(--tinta-2, #4B5B54); }
.estado-problema .doc-mensaje { color: #8A4B06; font-weight: 600; }
.doc-como { margin-top: 8px; font-size: 14px; color: var(--tinta-2, #4B5B54); }
.doc-como summary { cursor: pointer; font-weight: 700; color: var(--verde-700, #16624B); }
.doc-como p { margin: 6px 0 0; }
.btn-subir { margin-top: 12px; min-height: 44px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

@media (max-width: 599px) {
  .demo .entrada-doc { display: none; }
  .demo .titulo-doc { font-size: 28px; margin-bottom: 4px; }
  .pestanas { margin-top: 12px; }
}
