/* GCOMP global theme overrides — stock statuses */

/* ==========================================================================
   Stock status badges (category page + listings)
   Pastel-toned, minimal, with subtle SVG icons.
   ========================================================================== */

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: all .2s ease;
}

.stock-status::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

/* In stock — soft mint green with check */
.stock-status.instock {
  color: #2e7d57;
  background: #eaf7f0;
  border-color: #cfe9d9;
}
.stock-status.instock::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='%232e7d57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Only Online — warm amber with subtle pulsing dot */
.stock-status.onlyonline {
  color: #8a5a00;
  background: #fff6e0;
  border-color: #f0dfa6;
}
.stock-status.onlyonline::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%2353a974'/%3E%3C/svg%3E");
  animation: gcomp-pulse 2s ease-in-out infinite;
}

/* 2-3 days — soft blue with clock */
.stock-status.status-2-3days {
  color: #1f5f8b;
  background: #e7f1fa;
  border-color: #c7dcee;
}
.stock-status.status-2-3days::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231f5f8b' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M8 4.5V8l2.5 1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Preorder — soft coral with arrow */
.stock-status.status-preorder {
  color: #a8421f;
  background: #fdeee7;
  border-color: #f5cfc1;
}
.stock-status.status-preorder::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a8421f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h9M9 5l3 3-3 3'/%3E%3C/svg%3E");
}

/* Check supplies — soft lavender with question mark */
.stock-status.status-checkstock {
  color: #6a4595;
  background: #f1ebf8;
  border-color: #d7c8ea;
}
.stock-status.status-checkstock::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236a4595' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M6.3 6a1.7 1.7 0 0 1 3.4 0c0 1-.7 1.4-1.4 1.7-.4.2-.6.4-.6.8'/%3E%3Ccircle cx='8' cy='11.5' r='.5' fill='%236a4595'/%3E%3C/svg%3E");
}

/* Out of stock — soft grey */
.stock-status.outofstock {
  color: #b03b1f;
  background: #fdecea;
  border-color: #f3c8c0;
}
.stock-status.outofstock::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b03b1f' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 5l6 6M11 5l-6 6'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Product detail page badges (#product/.qty-not-in-stock etc)
   Same palette, slightly larger size.
   ========================================================================== */

#product .status-pd-onlyonline,
#popup-quickview .status-pd-onlyonline,
#product .status-pd-2-3days,
#popup-quickview .status-pd-2-3days,
#product .status-pd-preorder,
#popup-quickview .status-pd-preorder,
#product .status-pd-checkstock,
#popup-quickview .status-pd-checkstock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid transparent;
}

#product .status-pd-onlyonline,
#popup-quickview .status-pd-onlyonline {
  color: #8a5a00;
  background: #fff6e0;
  border-color: #f0dfa6;
}
#product .status-pd-onlyonline .blink-dot,
#popup-quickview .status-pd-onlyonline .blink-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #53a974;
  display: inline-block;
  animation: gcomp-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

#product .status-pd-2-3days,
#popup-quickview .status-pd-2-3days {
  color: #1f5f8b;
  background: #e7f1fa;
  border-color: #c7dcee;
}
#product .status-pd-2-3days::before,
#popup-quickview .status-pd-2-3days::before {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231f5f8b' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M8 4.5V8l2.5 1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#product .status-pd-preorder,
#popup-quickview .status-pd-preorder {
  color: #a8421f;
  background: #fdeee7;
  border-color: #f5cfc1;
}
#product .status-pd-preorder::before,
#popup-quickview .status-pd-preorder::before {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a8421f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h9M9 5l3 3-3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#product .status-pd-checkstock,
#popup-quickview .status-pd-checkstock {
  color: #6a4595;
  background: #f1ebf8;
  border-color: #d7c8ea;
}
#product .status-pd-checkstock::before,
#popup-quickview .status-pd-checkstock::before {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236a4595' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M6.3 6a1.7 1.7 0 0 1 3.4 0c0 1-.7 1.4-1.4 1.7-.4.2-.6.4-.6.8'/%3E%3Ccircle cx='8' cy='11.5' r='.5' fill='%236a4595'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Listing page (.product-thumb) blink-dot for onlyonline */
.product-thumb .stock-status.onlyonline .blink-dot,
.stock-status.onlyonline .blink-dot {
  display: none; /* dot already provided via ::before */
}

/* ==========================================================================
   Animation: subtle, not screaming
   ========================================================================== */
@keyframes gcomp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}
