/* ═════════════════════════════════════════════════════════
   URGENCY BAR - REBUILT FOR ALL DEVICES
   ════════════════════════════════════════════════════════ */

.urgency-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta), var(--color-yellow));
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  /* Removed min-height — use padding only */
  padding: 0.6rem 3.5rem 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #000;
  box-shadow: 0 2px 10px rgba(0, 255, 200, 0.3);
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Offset navbar and hero when bar is visible ── */
body:not(.urgency-hidden) #navbar { margin-top: 44px; }
body:not(.urgency-hidden) #hero   { padding-top: calc(80px + 44px); }
html:not(.urgency-hidden)         { scroll-padding-top: 124px; }

.urgency-bar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  /* NO flex-wrap so items stay on one line on desktop */
}

/* OPEN NOW badge */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.urgency-dot {
  width: 8px;
  height: 8px;
  background: #00FF00;
  border-radius: 50%;
  animation: pulse-dot 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* Message text — grow to fill available space */
.urgency-message {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Order Now" button */
.urgency-cta {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}
.urgency-cta:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}

/* Close (×) button */
.urgency-close {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 50%;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  z-index: 10;
  flex-shrink: 0;
}
.urgency-close:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-50%) rotate(90deg);
}

/* Slide-in animation */
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
.urgency-bar.show { animation: slide-down 0.5s ease-out, gradient-shift 3s ease infinite; }
.urgency-bar.hide { animation: slide-down 0.5s ease-out reverse; }

/* ── TABLET (768px) ── */
@media (max-width: 768px) {
  .urgency-bar {
    padding: 0.5rem 3rem 0.5rem 0.75rem;
    font-size: 0.76rem;
  }

  .urgency-bar-content { gap: 0.5rem; }

  .urgency-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  .urgency-message { font-size: 0.74rem; }

  .urgency-cta {
    padding: 0.25rem 0.7rem;
    font-size: 0.72rem;
  }

  body:not(.urgency-hidden) #navbar { margin-top: 40px; }
  body:not(.urgency-hidden) #hero   { padding-top: calc(80px + 40px); }
  html:not(.urgency-hidden)         { scroll-padding-top: 120px; }
}

/* ── MOBILE (480px) — single line, compact ── */
@media (max-width: 480px) {
  .urgency-bar {
    padding: 0.45rem 2.8rem 0.45rem 0.6rem;
    font-size: 0.7rem;
  }

  /* Hide the badge pill on very small screens — too cramped */
  .urgency-badge { display: none; }

  .urgency-message {
    font-size: 0.68rem;
    text-align: left;
  }

  /* Keep the Order Now button — just smaller */
  .urgency-cta {
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
  }

  .urgency-close {
    width: 22px;
    height: 22px;
    right: 0.4rem;
    font-size: 0.85rem;
  }

  body:not(.urgency-hidden) #navbar { margin-top: 36px; }
  body:not(.urgency-hidden) #hero   { padding-top: calc(80px + 36px); }
  html:not(.urgency-hidden)         { scroll-padding-top: 116px; }
}

/* Print friendly */
@media print {
  .urgency-bar { display: none; }
  body { margin-top: 0; }
}
