/* NEXT DAY PATCH (NDP) — Custom CSS Utilities */

/* Global Brand Color Focus Border for All Inputs, Selects & Textareas */
input:focus,
textarea:focus,
select:focus,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none !important;
  border-color: #1e4633 !important; /* NDP Brand Pine */
}

/* Thin White Scrollbar (always visible) */
html {
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 #fbf9f4;
  background-color: #fbf9f4;
}

html::-webkit-scrollbar {
  width: 6px;
}

html::-webkit-scrollbar-track {
  background: #fbf9f4;
}

html::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 9999px;
}

html::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* Hide Scrollbar Utility */
.scrollbar-hide::-webkit-scrollbar {
  display: none !important;
}

.scrollbar-hide {
  -ms-overflow-style: none !important; /* IE and Edge */
  scrollbar-width: none !important; /* Firefox */
}

/* Related Products Swiper (Product Detail Page) */
.related-products-swiper .swiper-pagination {
  position: static;
  margin-top: 1.25rem;
}

.related-products-swiper .swiper-pagination-bullet {
  background: #d9d5c6;
  opacity: 1;
  width: 8px;
  height: 8px;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.related-products-swiper .swiper-pagination-bullet-active {
  background: #1e4633;
  width: 24px;
  border-radius: 9999px;
}

.related-products-nav-btn.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

/* Customer Reviews Swiper (Product Detail Page) */
.product-reviews-swiper .swiper-pagination {
  position: static;
  margin-top: 1.25rem;
}

.product-reviews-swiper .swiper-pagination-bullet {
  background: #d9d5c6;
  opacity: 1;
  width: 8px;
  height: 8px;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.product-reviews-swiper .swiper-pagination-bullet-active {
  background: #1e4633;
  width: 24px;
  border-radius: 9999px;
}

/*
 * watchOverflow locks the nav/pagination when every review already fits.
 * The Tailwind `flex` utility on the buttons outranks Swiper's own
 * `.swiper-button-lock { display: none }`, so restate it with more weight.
 */
.product-reviews-prev.swiper-button-lock,
.product-reviews-next.swiper-button-lock,
.product-reviews-swiper .swiper-pagination-lock {
  display: none;
}

/* Drop the whole nav row (and its margin) when both arrows are locked */
.product-reviews-nav:has(.swiper-button-lock) {
  display: none;
}

.product-reviews-prev.swiper-button-disabled,
.product-reviews-next.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

.product-reviews-prev.swiper-button-disabled:hover,
.product-reviews-next.swiper-button-disabled:hover {
  background: transparent;
  color: #12231c;
}

/* Order Confirmation: print the receipt card only, never the whole page */
@media print {
  body:has(#printReceipt) {
    background: #ffffff !important;
  }

  body:has(#printReceipt) * {
    visibility: hidden;
  }

  body:has(#printReceipt) #printReceipt,
  body:has(#printReceipt) #printReceipt * {
    visibility: visible;
  }

  body:has(#printReceipt) #printReceipt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  #printReceipt .print-hide {
    display: none !important;
  }

  #printReceipt .print-avoid-break {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  @page {
    margin: 12mm;
  }
}
