/* Sellito Card · estilos solo del diseñador (/crear/).
   Lo común (botones, campos, teléfono, tarjeta) está en /estilos.css. */

/* ---------- Vista previa ---------- */
.crear__vista .tel { --tel-alto: clamp(440px, calc(100vh - 330px), 600px); }

/* ---------- Barra de pasos ---------- */
.etapas { margin-bottom: 20px; }
.etapas ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.etapas button {
  width: 100%; min-height: 56px; padding: 12px 0 6px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: none; border: 0; border-top: 4px solid var(--linea);
  font: 600 15px var(--f-texto); line-height: 1.2; color: var(--grafito); text-align: left;
  cursor: pointer; transition: border-color .2s ease, color .2s ease;
}
.etapas button:hover { color: var(--tinta); }
.etapas__num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px;
  border: 1.5px solid currentColor;
}
.etapas .hecho button { border-top-color: var(--azul); color: var(--tinta); }
.etapas .hecho .etapas__num { background: var(--azul); border-color: var(--azul); color: var(--papel); }
.etapas button[aria-current="step"] { border-top-color: var(--azul); color: var(--tinta); }
.etapas button[aria-current="step"] .etapas__num { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }

.etapa:focus { outline: none; }
.etapas__nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; }
.etapas__nav #d-siguiente { margin-left: auto; }
.etapas__nav [hidden] { display: none; }

/* ---------- Tarjetitas de color ---------- */
.tarjetitas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#colores-tarjeta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tarjetita {
  display: flex; min-height: 66px; overflow: hidden;
  background: #fff; border: 1.5px solid var(--linea); border-radius: 14px;
  transition: border-color .15s ease;
}
.tarjetita:hover, .tarjetita:focus-within { border-color: var(--azul); }
.tarjetita__muestra {
  flex: none; width: 64px; align-self: stretch; min-height: 66px;
  padding: 0; margin: 0; border: 0; border-right: 1.5px solid var(--linea);
  background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.tarjetita__muestra::-webkit-color-swatch-wrapper { padding: 0; }
.tarjetita__muestra::-webkit-color-swatch { border: 0; border-radius: 0; }
.tarjetita__muestra::-moz-color-swatch { border: 0; border-radius: 0; }
.tarjetita__muestra:focus-visible { outline: 3px solid var(--azul); outline-offset: -3px; }
.tarjetita__texto { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; }
.tarjetita__texto label { font-size: 15px; font-weight: 600; line-height: 1.2; }
.tarjetita__hex {
  width: 100%; min-height: 30px; padding: 0; margin: 0;
  border: 0; border-bottom: 1.5px dashed transparent; background: transparent;
  font: 400 15px var(--f-texto); color: var(--grafito); text-transform: uppercase;
}
.tarjetita__hex:hover { border-bottom-color: var(--linea); }
.tarjetita__hex:focus { outline: none; border-bottom-color: var(--azul); color: var(--tinta); }
.tarjetita__hex[aria-invalid="true"] { color: var(--tinta); border-bottom-color: #B3261E; }
.tarjetita__error { font-size: 13px; line-height: 1.3; color: #B3261E; }
.tarjetita__error:empty { display: none; }

/* Aviso amable de contraste */
.aviso-suave {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 143, 177, .28);      /* rosa como forma, texto en tinta */
  font-size: 15px;
}
.aviso-suave[hidden] { display: none; }
.aviso-suave p { flex: 1 1 220px; }

/* ---------- Íconos ---------- */
.sellos-iconos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sello-elegir { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.icono-tarjetita summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: stretch; min-height: 66px; overflow: hidden;
  background: #fff; border: 1.5px solid var(--linea); border-radius: 14px;
  transition: border-color .15s ease;
}
.icono-tarjetita summary::-webkit-details-marker { display: none; }
.icono-tarjetita summary:hover, .icono-tarjetita[open] summary { border-color: var(--azul); }
.icono-tarjetita summary::after {
  content: ""; align-self: center; flex: none; width: 10px; height: 10px; margin: 0 16px 0 auto;
  border-right: 2px solid var(--grafito); border-bottom: 2px solid var(--grafito);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s ease;
}
.icono-tarjetita[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.icono-tarjetita__muestra {
  flex: none; width: 64px; display: grid; place-items: center;
  border-right: 1.5px solid var(--linea);
}
.icono-tarjetita__muestra img { width: 34px; height: 34px; object-fit: contain; }
.icono-tarjetita__texto { display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; min-width: 0; }
.icono-tarjetita__texto strong { font-size: 15px; font-weight: 600; line-height: 1.2; }
.icono-tarjetita__texto small { font-size: 14px; color: var(--grafito); }
.icono-tarjetita .iconos { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
.icono-tarjetita .iconos button { min-height: 46px; border-radius: 12px; }

.casilla { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 600; cursor: pointer; }
.casilla input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--azul); cursor: pointer; }
.propio { display: flex; flex-direction: column; gap: 8px; }
.propio[hidden] { display: none; }
.ayuda--error { color: #B3261E; }
.ayuda--grande { font-size: 16px; color: #3A3D48; }

/* ---------- Notificaciones ---------- */
.paso legend .etiqueta--sola { margin: 0; }
.avisos { display: flex; flex-direction: column; }
.aviso-opcion { padding: 10px 0 14px; border-top: 1px solid var(--linea); display: flex; flex-direction: column; gap: 4px; }
.aviso-opcion:first-child { border-top: 0; padding-top: 0; }
.aviso-opcion__desc { margin-left: 30px; margin-top: -6px; }
.aviso-opcion__cuerpo { margin: 6px 0 0 30px; display: flex; flex-direction: column; gap: 14px; }
.aviso-opcion__cuerpo[hidden] { display: none; }
.campo--corto { max-width: 220px; }
.campo textarea {
  width: 100%; min-height: 76px; padding: 12px 16px; resize: vertical;
  font: inherit; font-size: 17px; line-height: 1.4; color: var(--tinta);
  background: #fff; border: 1.5px solid var(--linea); border-radius: 12px;
}
.campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(43,63,214,.2); }

/* ---------- Celular y tablet ---------- */
@media (max-width: 960px) {
  .crear__vista .tel { --tel-alto: 520px; }
}
@media (max-width: 640px) {
  .crear__vista .tel { --tel-alto: 480px; }
  .etapas ol { gap: 6px; }
  .etapas button { min-height: 44px; padding-top: 10px; }
  .etapas__texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .etapas__actual { display: block; }
  .logos, .enlaces { grid-template-columns: 1fr; }
  .sucursal { grid-template-columns: 1fr; }
  .sellos-iconos { grid-template-columns: 1fr; }
  .tarjetitas, #colores-tarjeta { grid-template-columns: 1fr 1fr; }
  .tarjetita__muestra { width: 48px; }
  .tarjetita__texto { padding: 8px 10px; }
  .aviso-opcion__cuerpo, .aviso-opcion__desc { margin-left: 0; }
  .etapas__nav .boton { flex: 1; }
}
@media (max-width: 380px) {
  .tarjetitas, #colores-tarjeta { grid-template-columns: 1fr; }
}

/* ===================== Segunda ronda ===================== */

/* Texto del paso actual (solo en celular, donde la barra muestra números) */
.etapas__actual { display: none; margin-top: 10px; font-size: 15px; font-weight: 600; }

/* Controles bajo el teléfono */
.vista__controles { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.boton-reverso {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--linea); background: var(--blanco); color: var(--tinta);
  font: 600 15px var(--f-texto);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.boton-reverso:hover { border-color: var(--azul); }
.boton-reverso[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }

/* Dos logos */
.logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.subir { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.subir__fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.subir__mini {
  flex: none; display: grid; place-items: center; overflow: hidden;
  border: 1.5px dashed var(--linea); border-radius: 12px;
  background: #fff repeating-conic-gradient(#EEEBE3 0 25%, #fff 0 50%) 50% / 12px 12px;   /* cuadritos = transparente */
}
.subir__mini:empty { background: #fff; }
.subir__mini--cuadrado { width: 52px; height: 52px; }
.subir__mini--horizontal { width: 96px; height: 52px; }
.subir__mini img { width: 100%; height: 100%; object-fit: contain; }
.subir__estado { display: flex; align-items: center; gap: 14px; min-height: 0; font-size: 15px; }
.subir__estado:has(.subir__listo[hidden]) { display: none; }
.subir__listo { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.subir__listo::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--azul) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23F3F0E8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.subir__listo[hidden] { display: none; }
.subir .enlace-boton[hidden] { display: none; }

/* Opciones tipo píldora (vencimiento y código) */
.campo-grupo { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.campo-grupo legend { padding: 0; margin-bottom: 10px; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { position: relative; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opcion span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid var(--linea); background: #fff;
  font-size: 15px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.opcion:hover span { border-color: var(--azul); }
.opcion input:checked + span { background: var(--azul); border-color: var(--azul); color: var(--papel); }
.opcion input:focus-visible + span { outline: 3px solid var(--azul); outline-offset: 3px; }

/* Tus clientes */
.datos { display: flex; flex-direction: column; }
.dato { padding: 6px 0 12px; border-top: 1px solid var(--linea); }
.dato:first-child { border-top: 0; padding-top: 0; }
.dato__desc { margin-left: 30px; }
.casilla--bloqueada { cursor: default; }
.casilla--bloqueada input { cursor: not-allowed; }
.nota-tinta { font-size: 15px; color: #3A3D48; background: var(--papel); border-radius: 12px; padding: 12px 16px; }

/* Detalles */
.campo__auto { padding: 12px 16px; border: 1.5px dashed var(--linea); border-radius: 12px; background: var(--papel); font-size: 17px; }
.enlaces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.enlaces .campo input, .sucursal .campo input { font-size: 17px; min-height: 48px; }
.terminos__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.terminos__pie [hidden] { display: none; }
#d-terminos { min-height: 150px; }

/* Sucursales */
.sucursales { display: flex; flex-direction: column; gap: 10px; }
.sucursales__lista { display: flex; flex-direction: column; gap: 12px; }
.sucursal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 10px; align-items: end; }
.sucursal__quitar { min-height: 48px; }
.sucursales > .enlace-boton { align-self: flex-start; }
.sucursales > .enlace-boton[hidden] { display: none; }

@media (max-width: 640px) {
  .etapas__actual { display: block; }
  .logos, .enlaces, .sucursal { grid-template-columns: 1fr; }
  .sucursal__quitar { min-height: 44px; justify-self: start; }
  .dato__desc { margin-left: 0; }
}

/* ===================== Tercera ronda ===================== */

/* Colores de los sellos: 3 tarjetitas + "Fondo de los sellos" */
#colores-sellos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fondo-sellos { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.fondo-sellos .tarjetitas { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
.fondo-sellos .tarjetitas[hidden] { display: none; }

/* Letra chica al final de Notificaciones */
.letra-chica { margin: -4px 4px 16px; font-size: 13px; line-height: 1.5; color: var(--grafito); }

/* Caja final: "Copiar resumen" como enlace pequeño */
.enlace-boton--papel { align-self: flex-start; color: var(--papel); font-size: 15px; }
.enlace-boton--papel:hover { color: #fff; }
.paso--final .botones { margin-top: 4px; }

/* Ventanas (recorte y guardado) */
.ventana {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  padding: 28px; border: 0; border-radius: var(--radio);
  background: var(--blanco); color: var(--tinta);
  box-shadow: 0 24px 60px -20px rgba(20,22,28,.45);
}
.ventana::backdrop { background: rgba(20,22,28,.55); }
.ventana[open] { display: flex; flex-direction: column; gap: 14px; }
.ventana__titulo { font-family: var(--f-titulo); font-weight: 800; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.ventana p { font-size: 17px; }
.ventana .ayuda { font-size: 14px; white-space: pre-line; }
.ventana .ayuda:empty, .ventana [hidden] { display: none; }
.ventana__acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 6px; }

.recorte { width: min(720px, calc(100vw - 32px)); }
.recorte__lienzo { height: min(52vh, 420px); border-radius: 14px; overflow: hidden; background: #E7E3D9; }
.recorte__lienzo img { display: block; max-width: 100%; }
.recorte__herramientas { display: flex; justify-content: center; gap: 10px; }
.boton-icono {
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1.5px solid var(--linea); background: #fff; color: var(--tinta);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.boton-icono:hover { border-color: var(--tinta); background: var(--tinta); color: var(--papel); }

/* Cropper.js con los colores de la marca */
.recorte .cropper-view-box { outline: 2px solid var(--azul); outline-color: var(--azul); }
.recorte .cropper-line { background-color: var(--azul); }
.recorte .cropper-point { background-color: var(--azul); width: 14px !important; height: 14px !important; opacity: 1; border: 2px solid #fff; border-radius: 50%; }
.recorte .cropper-point.point-nw { left: -7px; top: -7px; }
.recorte .cropper-point.point-ne { right: -7px; top: -7px; }
.recorte .cropper-point.point-sw { left: -7px; bottom: -7px; }
.recorte .cropper-point.point-se { right: -7px; bottom: -7px; }
.recorte .cropper-point.point-se::before { display: none; }
.recorte .cropper-point.point-n, .recorte .cropper-point.point-s, .recorte .cropper-point.point-e, .recorte .cropper-point.point-w { display: none; }
.recorte .cropper-modal { background-color: var(--tinta); opacity: .55; }
.recorte .cropper-bg { background-image: none; background-color: #E7E3D9; }

@media (max-width: 640px) {
  #colores-sellos, .fondo-sellos .tarjetitas { grid-template-columns: 1fr 1fr; }
  .ventana { padding: 22px 18px; }
  .ventana__titulo { font-size: 23px; }
  .ventana__acciones { flex-direction: column-reverse; }
  .ventana__acciones .boton { width: 100%; }
  .recorte__lienzo { height: 46vh; }
}
@media (max-width: 380px) {
  #colores-sellos, .fondo-sellos .tarjetitas { grid-template-columns: 1fr; }
}

.recorte__completa { margin-right: auto; }
