/* ============================================================
   entrega.css · EL BLOQUE DE DELIVERY EN EL CARRITO
   ------------------------------------------------------------
   Lo pinta entrega.js debajo de Retiro/Delivery. Un botón grande
   para pedir la ubicación, una tarjeta con la zona y el precio,
   y el campo de referencia. Misma familia visual que el resto
   del formulario: fondo #111, borde tenue, amarillo solo en lo
   que importa (la zona encontrada y el precio).
   ============================================================ */

.entrega {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  animation: entrega-aparece .22s ease both;
}
@keyframes entrega-aparece {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* El botón de ubicar: es la acción principal del delivery. */
.entrega-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  background: var(--brand-yellow, #F5C518);
  color: #080808;
  border: none;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: filter .18s ease, transform 90ms ease;
}
.entrega-btn:hover { filter: brightness(1.05); }
.entrega-btn.buscando {
  background: var(--bg-card, #111);
  color: #fff;
  border: 1px solid rgba(245, 197, 24, .35);
  cursor: progress;
}
.entrega-btn-icono { font-size: 24px; line-height: 1; }
.entrega-btn-texto { display: flex; flex-direction: column; gap: 2px; }
.entrega-btn-texto strong {
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1;
}
.entrega-btn-texto small { font-size: 12.5px; opacity: .78; line-height: 1.25; }

.entrega-spinner {
  width: 22px; height: 22px; flex: 0 0 auto;
  border: 2.5px solid rgba(245, 197, 24, .25);
  border-top-color: var(--brand-yellow, #F5C518);
  border-radius: 50%;
  animation: entrega-gira .8s linear infinite;
}
@keyframes entrega-gira { to { transform: rotate(360deg); } }

/* La tarjeta con el resultado. */
.entrega-zona {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card, #111);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
}
.entrega-zona.ok { border-color: rgba(245, 197, 24, .45); box-shadow: 0 0 0 3px rgba(245, 197, 24, .08); }
.entrega-zona.fuera { border-color: rgba(255, 90, 90, .35); }
.entrega-zona-emoji { font-size: 24px; line-height: 1; }
.entrega-zona-datos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entrega-zona-datos strong {
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .6px;
  line-height: 1.1;
  color: #fff;
}
.entrega-zona-datos small { font-size: 12.5px; color: var(--text-off, #B8B8B8); line-height: 1.3; }
.entrega-zona-precio {
  font-family: var(--font-display, 'Anton', Impact, sans-serif);
  font-size: 22px;
  color: var(--brand-yellow, #F5C518);
  letter-spacing: .5px;
}

.entrega-acciones { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entrega-btn-sec {
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
}
.entrega-btn-sec.principal { background: #fff; color: #080808; border-color: #fff; }

.entrega-link {
  background: none;
  border: none;
  padding: 6px 0;
  color: var(--text-off, #B8B8B8);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  justify-self: start;
  min-height: 32px;
}
.entrega-link:hover { color: #fff; }

.entrega-ref-campo { display: block; }
.entrega-privacidad {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-dim, #6a6a6a);
  line-height: 1.35;
}

/* La línea del envío, arriba del total del carrito. */
.entrega-fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px 8px;
  font-size: 13px;
  color: var(--text-off, #B8B8B8);
}
.entrega-fila-nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entrega-fila-precio {
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}
.entrega-fila-precio .peso { color: #fff; }

/* `hidden` tiene que ganarle a los display de arriba: el navegador
   lo pone con menos peso que cualquier regla de autor. */
.entrega[hidden], .entrega-fila[hidden] { display: none !important; }
