/* Odliczanie do wysyłki */
:root {
  --shipcd-accent: #d40511;
  --shipcd-accent-rgb: 212, 5, 17;
}

.shipcd {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 1rem 0;
  padding: .85rem 1rem;
  border: 1px solid rgba(var(--shipcd-accent-rgb), .22);
  border-left: 4px solid var(--shipcd-accent);
  border-radius: 10px;
  background: rgba(var(--shipcd-accent-rgb), .05);
  color: #232323;
  font-size: .9375rem;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  transition: opacity .25s ease, background-color .3s ease, border-color .3s ease;
}
.shipcd.is-ready { opacity: 1; }
.shipcd[hidden] { display: none !important; }

.shipcd__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--shipcd-accent);
  color: #fff;
  position: relative;
}

.shipcd__body { flex: 1 1 auto; min-width: 0; }
.shipcd__msg { margin: 0; }
.shipcd__msg strong { font-weight: 700; color: #111; }
.shipcd__msg[hidden] { display: none; }

.shipcd__timer {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .25rem;
  vertical-align: middle;
  margin: .15rem 0;
}
.shipcd__unit {
  display: inline-flex;
  align-items: baseline;
  gap: .15rem;
  padding: .1rem .45rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(var(--shipcd-accent-rgb), .25);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}
.shipcd__num {
  font-weight: 700;
  font-size: 1.05em;
  font-variant-numeric: tabular-nums;
  color: var(--shipcd-accent);
  min-width: 2ch;
  text-align: right;
}
.shipcd__lbl { font-size: .75em; color: #6b7280; }

.shipcd__day { font-weight: inherit; }

.shipcd__note {
  margin: .4rem 0 0;
  font-size: .8125rem;
  color: #6b7280;
}
.shipcd__note span { color: #374151; font-weight: 600; }

/* Ostatnie minuty */
.shipcd.is-urgent { background: rgba(var(--shipcd-accent-rgb), .09); }
.shipcd.is-urgent .shipcd__icon::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(var(--shipcd-accent-rgb), .55);
  animation: shipcd-pulse 1.6s ease-out infinite;
}
@keyframes shipcd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--shipcd-accent-rgb), .55); }
  100% { box-shadow: 0 0 0 10px rgba(var(--shipcd-accent-rgb), 0); }
}

/* Po godzinie granicznej – spokojniejsza, neutralna wersja */
.shipcd.is-later {
  border-color: #e5e7eb;
  border-left-color: #9ca3af;
  background: #f9fafb;
}
.shipcd.is-later .shipcd__icon { background: #6b7280; }

/* Wariant w koszyku (pod wybranym przewoźnikiem) */
.shipcd--checkout {
  margin: .5rem 0 .75rem;
  padding: .6rem .8rem;
  font-size: .875rem;
}
.shipcd--checkout .shipcd__icon { width: 1.9rem; height: 1.9rem; }
.shipcd--checkout .shipcd__icon svg { width: 16px; height: 16px; }

/* Etykieta przy nazwie przewoźnika */
.shipcd-badge {
  display: inline-block;
  margin-left: .5rem;
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--shipcd-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .01em;
  white-space: nowrap;
  vertical-align: middle;
}
.shipcd-badge.is-later { background: #e5e7eb; color: #374151; }

@media (max-width: 480px) {
  .shipcd { font-size: .875rem; padding: .75rem .8rem; gap: .6rem; }
  .shipcd__icon { width: 2rem; height: 2rem; }
  .shipcd-badge { margin: .25rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shipcd, .shipcd * { transition: none !important; animation: none !important; }
}
