/* ============================================================
   cuenta.css · LA CUENTA DEL CLIENTE
   ------------------------------------------------------------
   Tres piezas:
     1. El bloque en el carrito, arriba de "Datos del pedido". Sin
        sesión: el botón de Google y para qué sirve. Con sesión: el
        saludo, Mis pedidos, Salir y la casilla de promociones.
     2. La hoja "Mis pedidos": reusa la hoja del detalle de producto
        (.modal-overlay / .modal-sheet). Cada pedido con las fotos
        de lo que llevaba, cuándo, cómo va, cuánto, y sus botones.
        Al final, "Tus datos".
     3. Las direcciones guardadas dentro del paso de entrega.
   Nada de esto empuja ni tapa el formulario: pedir como invitado
   sigue siendo el camino normal.
   ============================================================ */

.cuenta {
  margin: 0 0 14px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .03);
}
.cuenta[hidden] { display: none !important; }
.cuenta-i { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 1 · Sin sesión ---------- */
.cuenta-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 16px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18);
  background: #fff; color: #1f1f1f; cursor: pointer;
  font-family: var(--font-body, 'Barlow', sans-serif);
  font-size: 15px; font-weight: 700; letter-spacing: .2px;
  transition: transform .12s ease, background .2s ease;
}
.cuenta-google:hover { background: #f4f4f4; }
.cuenta-google:active { transform: scale(.985); }
.cuenta-google:disabled { opacity: .6; cursor: progress; }
.cuenta-g { width: 20px; height: 20px; flex: 0 0 auto; }

.cuenta-nota { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.4; color: var(--text-off, #9a9a9a); text-align: center; }
.cuenta-aviso { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: var(--brand-yellow, #F5C518); text-align: center; }
.cuenta-aviso[hidden] { display: none !important; }

/* ---------- 1 · Con sesión ---------- */
.cuenta-hola { display: flex; align-items: center; gap: 10px; }
.cuenta-foto { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: #222; }
.cuenta-foto-vacia { display: block; border: 1px solid rgba(245, 197, 24, .4); }
.cuenta-txt { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.cuenta-txt strong { font-size: 15px; color: #fff; }
.cuenta-txt span { font-size: 12px; color: var(--text-off, #9a9a9a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-mis {
  flex: 0 0 auto; min-height: 36px; padding: 0 12px; cursor: pointer;
  border-radius: 999px; border: 1px solid rgba(245, 197, 24, .45); background: rgba(245, 197, 24, .08);
  color: var(--brand-yellow, #F5C518);
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 13px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
}
.cuenta-mis:hover { background: rgba(245, 197, 24, .16); }
.cuenta-salir {
  flex: 0 0 auto; background: none; border: 0; padding: 8px 4px; cursor: pointer;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 13px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-off, #9a9a9a);
}
.cuenta-salir:hover { color: #fff; }
/* La casilla de promociones: parte desmarcada, siempre. */
.cuenta-promos {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 10px;
  font-size: 13px; line-height: 1.35; color: var(--text-off, #b8b8b8); cursor: pointer;
}
.cuenta-promos input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--brand-yellow, #F5C518); }

/* ---------- 2 · La hoja "Mis pedidos" ---------- */
.cuenta-hoja-cuerpo { padding-bottom: 28px; }
.cuenta-hoja-cabeza { padding: 6px 20px 4px; }
.cuenta-cabeza-fila { display: flex; align-items: center; gap: 12px; }
.cuenta-cabeza-foto { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #141414; border: 2px solid rgba(245, 197, 24, .55); }
.cuenta-hoja-cabeza h2 {
  font-family: var(--font-display, 'Anton', Impact, sans-serif); font-size: 30px; line-height: 1;
  letter-spacing: .5px; text-transform: uppercase; color: #fff; margin: 0;
}
.cuenta-hoja-cabeza p { margin: 4px 0 0; font-size: 13px; color: var(--text-off, #9a9a9a); }
.cuenta-hoja-cabeza p b { color: var(--brand-yellow, #F5C518); font-weight: 700; }

.cuenta-lista { display: grid; gap: 10px; padding: 14px 20px 0; }
.cp-pedido {
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  padding: 12px 12px 11px;
}
.cp-pedido.vivo { border-color: rgba(245, 197, 24, .5); box-shadow: 0 0 0 1px rgba(245, 197, 24, .12), 0 10px 30px rgba(0, 0, 0, .35); }
.cp-cabeza { display: flex; align-items: center; gap: 10px; }
/* Las fotos de lo que llevaba, apiladas como monedas. */
.cp-fotos { display: flex; align-items: center; flex: 0 0 auto; }
.cp-fotos img, .cp-fotos span, .cp-fotos i {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-left: -12px;
  background: #1a1a1a; border: 2px solid #121212; box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.cp-fotos > :first-child { margin-left: 0; }
.cp-fotos span, .cp-fotos i {
  display: inline-flex; align-items: center; justify-content: center; font-style: normal;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 13px; font-weight: 800; color: #cfcfcf;
}
.cp-fotos i { background: rgba(245, 197, 24, .15); color: var(--brand-yellow, #F5C518); }
.cp-quien { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cp-cuando { font-size: 13.5px; font-weight: 700; color: #fff; }
.cp-modo { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-off, #9a9a9a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-modo .cuenta-i { width: 14px; height: 14px; color: var(--text-off, #9a9a9a); }
.cp-estado {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 11px; font-weight: 800;
  letter-spacing: 1.1px; text-transform: uppercase; color: #cfcfcf; white-space: nowrap;
}
.cp-estado i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: cp-vivo 1.8s ease-out infinite; }
@keyframes cp-vivo { 0% { box-shadow: 0 0 0 0 rgba(245, 197, 24, .5); } 100% { box-shadow: 0 0 0 7px rgba(245, 197, 24, 0); } }
.cp-estado.solicitado, .cp-estado.preparando, .cp-estado.nuevo, .cp-estado.aprobado { color: var(--brand-yellow, #F5C518); border-color: rgba(245, 197, 24, .45); }
.cp-estado.listo, .cp-estado.camino, .cp-estado.entregado { color: #25D366; border-color: rgba(37, 211, 102, .4); }
.cp-estado.cancelado, .cp-estado.rechazado { color: #ff7b7b; }
.cp-items { margin: 10px 0; font-size: 14px; line-height: 1.45; color: #e8e8e8; }
.cp-pie { display: flex; align-items: center; gap: 8px; }
.cp-total {
  flex: 1; min-width: 0; line-height: 1;
  font-family: var(--font-display, 'Anton', Impact, sans-serif); font-size: 22px; color: var(--brand-yellow, #F5C518);
}
.cp-ver, .cp-repetir {
  flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; text-decoration: none;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 13px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase; transition: transform .12s ease;
}
.cp-ver { border: 1px solid rgba(255, 255, 255, .18); color: #fff; background: transparent; }
.cp-ver.principal { border-color: rgba(245, 197, 24, .6); color: var(--brand-yellow, #F5C518); }
.cp-repetir { border: 0; background: var(--brand-yellow, #F5C518); color: #080808; }
.cp-repetir:active, .cp-ver:active { transform: scale(.97); }

/* Sin pedidos todavía: el pudú y una promesa. */
.cp-vacio { display: grid; justify-items: center; gap: 8px; padding: 12px 8px 4px; text-align: center; }
.cp-vacio img { width: 150px; height: auto; opacity: .95; }
.cp-vacio strong { font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 18px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #fff; }
.cp-vacio span { font-size: 13.5px; line-height: 1.45; color: var(--text-off, #9a9a9a); max-width: 300px; }
.cp-vacio .cp-repetir { margin-top: 8px; }

/* ---------- 2 · Tus datos ---------- */
.cuenta-datos { padding: 22px 20px 0; }
.cuenta-datos:empty { display: none; }
.cuenta-datos h3, .cuenta-datos h4 {
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: #fff; margin: 0;
}
.cuenta-datos h3 { font-size: 16px; }
.cuenta-datos h4 { font-size: 12.5px; color: var(--text-off, #9a9a9a); margin: 16px 0 8px; }
.cuenta-datos-sub { margin: 3px 0 10px; font-size: 12.5px; color: var(--text-off, #9a9a9a); }
.cuenta-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.cuenta-dl div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); min-width: 0; }
.cuenta-dl dt { font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-off, #9a9a9a); }
.cuenta-dl dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-dirs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cuenta-dirs li { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); color: var(--brand-yellow, #F5C518); }
.cuenta-dirs li span { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.cuenta-dirs li strong { font-size: 14px; color: #fff; }
.cuenta-dirs li small { font-size: 12px; color: var(--text-off, #9a9a9a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-dir-borrar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: var(--text-off, #9a9a9a); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cuenta-dir-borrar:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.cuenta-dir-borrar .cuenta-i { width: 14px; height: 14px; }
.cuenta-borrar {
  display: block; margin: 18px auto 0; background: none; border: 0; cursor: pointer;
  font-size: 12.5px; color: var(--text-off, #8a8a8a); text-decoration: underline; text-underline-offset: 3px;
}
.cuenta-borrar:hover { color: #ff7b7b; }

/* ---------- 3 · Direcciones guardadas en el paso de entrega ---------- */
.cuenta-direcciones { display: grid; gap: 6px; margin: 0 0 12px; }
.cuenta-direcciones-titulo { margin: 0 0 2px; font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 11.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand-yellow, #F5C518); }
.cuenta-dir {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(245, 197, 24, .35);
  background: rgba(245, 197, 24, .06); color: var(--brand-yellow, #F5C518);
  font-family: var(--font-body, 'Barlow', sans-serif); transition: background .2s ease, transform .12s ease;
}
.cuenta-dir:hover { background: rgba(245, 197, 24, .12); }
.cuenta-dir:active { transform: scale(.985); }
.cuenta-dir-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.cuenta-dir-txt strong { font-size: 14px; color: #fff; }
.cuenta-dir-txt small { font-size: 12px; color: var(--text-off, #b8b8b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuenta-dir-usar { flex: 0 0 auto; font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) { .cp-estado i { animation: none; } }

/* ---------- 0 · El perfil, arriba a la derecha ---------- */
/* Vive en la barra de categorías (sticky): acompaña todo el scroll,
   como en cualquier app. Sin sesión, la silueta; con sesión, la foto
   con el aro amarillo. */
.tabs-wrap { position: sticky; }
/* En el teléfono la tira de categorías termina ANTES del avatar: así
   "Bebidas" nunca queda debajo del botón, y la tira sigue deslizable. */
@media (max-width: 768px) {
  .tabs-wrap.con-cuenta .tabs { margin-right: 62px; padding-right: 8px; }
}
@media (min-width: 769px) {
  .tabs-wrap.con-cuenta .tabs { padding-right: 72px; }
}
/* Fijo en la esquina superior derecha, desde el primer píxel y durante
   todo el scroll — como en cualquier app. Cuando la barra de categorías
   se pega arriba, queda alineado con las pestañas. */
.cuenta-avatar {
  position: fixed; right: 14px; top: 16px; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: #151515; border: 1.5px solid rgba(255, 255, 255, .16); color: #e8e8e8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .45);
  transition: transform .15s ease, border-color .2s ease;
}
.cuenta-avatar:active { transform: scale(.94); }
/* Pestañas sin emoji en el teléfono: caben las tres enteras al lado del avatar. */
@media (max-width: 768px) {
  .tabs-wrap.con-cuenta .tabs { gap: 6px; }
  .tabs-wrap.con-cuenta .tab-icon { display: none; }
  .tabs-wrap.con-cuenta .tab { padding: 10px 12px; font-size: 13.5px; letter-spacing: .8px; }
}
.cuenta-nota-izq { text-align: left; margin: 0; }
.cuenta-avatar .cuenta-i { width: 20px; height: 20px; }
.cuenta-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cuenta-avatar.con-sesion { border: 2px solid var(--brand-yellow, #F5C518); box-shadow: 0 0 0 3px rgba(245, 197, 24, .18), 0 4px 16px rgba(0, 0, 0, .45); }
@media (min-width: 1000px) { .cuenta-avatar { right: max(14px, calc((100vw - 1200px) / 2 + 16px)); } }

/* ---------- 1 · La línea del carrito ---------- */
.cuenta-linea {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 0; background: none; border: 0; color: #fff; font-family: var(--font-body, 'Barlow', sans-serif);
}
.cuenta-linea:disabled { opacity: .6; cursor: progress; }
.cuenta-linea .cuenta-g { width: 22px; height: 22px; }
.cuenta-linea .cuenta-foto { width: 30px; height: 30px; }
.cuenta-linea .cuenta-foto-vacia { display: inline-flex; align-items: center; justify-content: center; color: var(--brand-yellow, #F5C518); }
.cuenta-linea .cuenta-foto-vacia .cuenta-i { width: 16px; height: 16px; }
.cuenta-linea-txt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.3; color: var(--text-off, #b8b8b8); }
.cuenta-linea-txt strong { color: #fff; font-weight: 700; }
.cuenta-linea-accion {
  flex: 0 0 auto; padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(245, 197, 24, .45); background: rgba(245, 197, 24, .08); color: var(--brand-yellow, #F5C518);
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
}

/* ---------- 2 · La hoja, sin sesión ---------- */
.cuenta-bienvenida { display: grid; gap: 12px; padding-bottom: 4px; }
.cuenta-beneficios { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 8px; }
.cuenta-beneficios li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); color: var(--brand-yellow, #F5C518); }
.cuenta-beneficios li .cuenta-i { width: 22px; height: 22px; }
.cuenta-beneficios li span { display: grid; line-height: 1.25; min-width: 0; }
.cuenta-beneficios li strong { font-size: 14.5px; color: #fff; }
.cuenta-beneficios li small { font-size: 12.5px; color: var(--text-off, #9a9a9a); }
.cuenta-invitado {
  background: none; border: 1px solid rgba(255, 255, 255, .16); color: #fff; cursor: pointer;
  min-height: 44px; border-radius: 999px;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 14px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase;
}
.cuenta-sesion-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.cuenta-salir-btn {
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .18); color: #fff;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
}
.cuenta-sesion-pie .cuenta-borrar { margin: 0; }

/* ---------- 4 · La app en el teléfono ---------- */
.cuenta-instalar {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  margin-top: 18px; padding: 12px 12px; border-radius: 14px; border: 1px solid rgba(245, 197, 24, .35);
  background: rgba(245, 197, 24, .06); color: var(--brand-yellow, #F5C518);
  font-family: var(--font-body, 'Barlow', sans-serif);
}
.cuenta-instalar.quieta { cursor: default; border-color: rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .03); }
.cuenta-instalar .cuenta-i { width: 22px; height: 22px; }
.cuenta-legal { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--text-off, #8a8a8a); }
.cuenta-legal a { color: var(--text-off, #b8b8b8); }

/* El aviso de instalar, abajo, una sola vez (instalar.js). */
.instalar-aviso {
  position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 150;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  border-radius: 16px; background: #141414; border: 1px solid rgba(245, 197, 24, .4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55); color: #fff;
  transform: translateY(24px); opacity: 0; transition: transform .28s ease, opacity .28s ease;
}
.instalar-aviso.visible { transform: none; opacity: 1; }
.instalar-aviso img { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; }
.instalar-aviso-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.instalar-aviso-txt strong { font-size: 14px; }
.instalar-aviso-txt small { font-size: 12px; color: var(--text-off, #9a9a9a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instalar-aviso-btn {
  flex: 0 0 auto; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand-yellow, #F5C518); color: #080808;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif); font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
}
.instalar-aviso-x { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text-off, #9a9a9a); font-size: 20px; cursor: pointer; }
@media (min-width: 700px) { .instalar-aviso { left: auto; right: 24px; width: 380px; } }
.footer-privacidad { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
