/* ═══════════════════════════════════════════════════════════════════
   ZonasReparto v2.5 — FIX
   Desktop: banner en flujo del topbar (NO fixed)
   Mobile ≤991px: fixed bottom
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --zr-red:   #8B1A1A;
  --zr-amber: #9A6010;
  --zr-ease:  cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base ────────────────────────────────────────────────────────── */
#zr-banner {
  /* FIX: en desktop NO es fixed → vive en el topbar del tema */
  left: 0;
  right: 0;
  z-index: 99999;
  background-color: #1A3A2E;
  border: none;
  display: block;
  width: 100%;
}

#zr-banner.zr-banner--warning { background-color: #3A2A08; }
#zr-banner.zr-banner--urgent  {
  background-color: #3A0E0E;
  animation: zr-urgentBg 2s ease-in-out infinite;
}

@keyframes zr-urgentBg {
  0%,100% { background-color: #3A0E0E; }
  50%      { background-color: #6A2020; }
}

/* ─── Inner ───────────────────────────────────────────────────────── */
.zr-banner__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 48px;
  position: relative;
}

/* ─── Camión ──────────────────────────────────────────────────────── */
.zr-banner__truck {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.85;
}
.zr-banner__truck svg {
  width: 17px; height: 17px;
  fill: rgba(255,255,255,0.85);
}

/* ─── Tag zona ────────────────────────────────────────────────────── */
.zr-banner__zona-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  background: #2A6048;
  border: 1px solid #2A6048;
  color: #9FE1CB;
}
#zr-banner.zr-banner--warning .zr-banner__zona-tag {
  background: #6A4A10; border-color: #6A4A10; color: #FAC775;
}
#zr-banner.zr-banner--urgent .zr-banner__zona-tag {
  background: #6A2020; border-color: #6A2020; color: #F7C1C1;
}

/* ─── Separador ───────────────────────────────────────────────────── */
.zr-banner__sep {
  width: 1px; height: 13px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* ─── Mensaje ─────────────────────────────────────────────────────── */
.zr-banner__mensaje {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zr-banner__mensaje strong { font-weight: 600; color: #fff; }

/* ─── Pill countdown ──────────────────────────────────────────────── */
.zr-banner__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.17);
  flex-shrink: 0;
}
.zr-banner__pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.65);
  flex-shrink: 0;
}
#zr-banner.zr-banner--urgent .zr-banner__pill-dot {
  background: #FFD700;
  animation: zr-dotBlink 1s ease-in-out infinite;
}
#zr-banner.zr-banner--warning .zr-banner__pill-dot { background: #EF9F27; }
@keyframes zr-dotBlink {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:.35; transform:scale(.65); }
}
.zr-banner__pill-label {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}
.zr-banner__countdown-timer {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
#zr-banner.zr-banner--warning .zr-banner__countdown-timer { color: #EF9F27; }

/* ─── Botón cerrar (oculto desktop, visible mobile) ──────────────── */
.zr-banner__close {
  display: none;
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ════════════════════════════════════════════════════════════════════
   DESKTOP ≥ 992px — banner en flujo del topbar
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 992px) {
  #zr-banner {
    /* FIX: sin position:fixed → el header del tema queda por encima */
    position: static;
    top: auto;
    bottom: auto;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    animation: zr-slideDown 0.38s cubic-bezier(0.16,1,0.3,1) both;
  }
  @keyframes zr-slideDown {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 60px; }
  }
  .zr-banner__inner { justify-content: center; }
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE ≤ 991px — fixed bottom (independiente del header)
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  #zr-banner {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    animation: zr-slideUp 0.38s cubic-bezier(0.16,1,0.3,1) both;
  }
  @keyframes zr-slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .zr-banner__inner {
    height: auto;
    min-height: 52px;
    padding: 10px 46px 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .zr-banner__truck,
  .zr-banner__sep,
  .zr-banner__pill { display: none !important; }
  .zr-banner__zona-tag { font-size: 9px; padding: 1px 7px; }
  .zr-banner__mensaje {
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.4;
    text-align: left;
  }
  .zr-banner__close { display: flex !important; }
}

@media (max-width: 400px) {
  .zr-banner__inner { padding: 9px 42px 9px 12px; }
  .zr-banner__mensaje { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  #zr-banner { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   Checkout — Bloque de confirmación (sin cambios)
   ═══════════════════════════════════════════════════════════════════ */
.zrc-confirm-box {
  margin: 16px 0 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(42,96,72,0.25);
  font-family: inherit;
}
.zrc-confirm-box--warning { border-color: rgba(106,74,16,0.3); }
.zrc-confirm-box--urgent  { border-color: rgba(106,32,32,0.45); }
.zrc-confirm-box__header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #1A3A2E; color: #fff;
}
.zrc-confirm-box--warning .zrc-confirm-box__header { background: #3A2A08; }
.zrc-confirm-box--urgent  .zrc-confirm-box__header { background: #3A0E0E; }
.zrc-confirm-box__header-icon { font-size: 1rem; }
.zrc-confirm-box__title { font-size: 0.82rem; font-weight: 700; color: #fff; display: block; }
.zrc-confirm-box__zona  { font-size: 0.7rem; color: rgba(255,255,255,0.72); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.zrc-confirm-box__body { background: #fff; padding: 12px 14px; }
.zrc-confirm-box__delivery { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.zrc-confirm-box__fecha-label { font-size: 0.72rem; color: #888; margin-bottom: 2px; }
.zrc-confirm-box__fecha { font-size: 1rem; font-weight: 700; color: #085041; }
.zrc-confirm-box__corte-label { font-size: 0.72rem; color: #888; display: block; margin-bottom: 2px; text-align: right; }
.zrc-confirm-box__corte-time  { font-size: 0.84rem; font-weight: 600; color: #333; display: block; text-align: right; }
.zrc-confirm-box__sep { height: 1px; background: #f0ebe5; margin: 10px 0; }
.zrc-confirm-box__urgencia {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; background: rgba(106,32,32,0.07);
  border-radius: 6px; font-size: 0.78rem; color: #6A2020; font-weight: 600;
}
.zrc-confirm-box__extra { font-size: 0.78rem; color: #777; font-style: italic; margin-top: 6px; }
@media (max-width: 480px) {
  .zrc-confirm-box__corte-label,
  .zrc-confirm-box__corte-time { text-align: left; }
}
