/* ==========================================================================
   Complete Office — Free delivery toast (solid teal, inverts on success)
   Uses the store's existing --evo-* tokens (fallbacks included).
   ========================================================================== */

/* -----------------------------------------------------------------------
   Toast (top-right, slides in) — progress state: solid teal, white text
   ----------------------------------------------------------------------- */
.co-delivery-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 40px);
  max-width: 360px;
  box-sizing: border-box;
  padding: 14px 40px 17px 14px;
  overflow: hidden;
  background: var(--evo-brand-default, #009983);
  border: 1.5px solid var(--evo-brand-default, #009983);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  opacity: 0;
  transform: translateX(110%);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.co-delivery-popup.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Congratulations state: inverted — white card, teal text */
.co-delivery-popup--congrats {
  background: #ffffff;
  color: var(--evo-brand-default, #009983);
}

/* Icon circle */
.co-delivery-popup__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.co-delivery-popup--congrats .co-delivery-popup__icon {
  background: var(--evo-brand-default, #009983);
  color: #ffffff;
}

.co-delivery-popup__icon svg {
  display: block;
}

/* Text */
.co-delivery-popup__body {
  flex: 1 1 auto;
  min-width: 0;
}

.co-delivery-popup__headline {
  margin: 0;
  font-size: 0.9375em;
  line-height: 1.45;
  color: inherit;
}

.co-delivery-popup__headline b {
  font-weight: 700;
  color: inherit;
}

.co-delivery-popup--congrats .co-delivery-popup__headline {
  font-size: 1em;
  font-weight: 700;
}

.co-delivery-popup__sub {
  margin: 4px 0 0;
  font-size: 0.8125em;
  line-height: 1.45;
  color: inherit;
}

/* Close button */
.co-delivery-popup__close {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}

.co-delivery-popup__close:hover {
  opacity: 1;
}

/* Countdown bar (white on teal, teal on white) */
.co-delivery-popup__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: #ffffff;
  transform-origin: left center;
  animation-name: co-delivery-countdown;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.co-delivery-popup--congrats .co-delivery-popup__bar {
  background: var(--evo-brand-default, #009983);
}

@keyframes co-delivery-countdown {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 480px) {
  .co-delivery-popup {
    top: 12px;
    right: 12px;
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .co-delivery-popup {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

/* ==========================================================================
   Cart page info line (inside .cart-totals, under the totals table)
   ========================================================================== */
.co-delivery-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  box-sizing: border-box;
  background: var(--evo-brand-accent, #e6f5f3);
  border-radius: 10px;
  color: var(--evo-text-col, #393939);
  font-size: 0.8125em;
  line-height: 1.4;
  text-align: left;
}

.co-delivery-info__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--evo-brand-default, #009983);
  color: #ffffff;
}

.co-delivery-info__icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.co-delivery-info__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: inherit;
}

.co-delivery-info__text b {
  font-weight: 700;
  color: var(--evo-brand-default, #009983);
}

/* Unlocked state: solid teal, white text */
.co-delivery-info--congrats {
  background: var(--evo-brand-default, #009983);
  color: #ffffff;
  font-weight: 700;
}

.co-delivery-info--congrats .co-delivery-info__icon {
  background: rgba(255, 255, 255, 0.2);
}
