
/* =====================================================
   POINTLESS POS — LINTED, SCOPED, COLLISION-SAFE CSS
   Version: 1.1
===================================================== */

/* =====================================================
   ACCESSIBILITY UTILITIES
===================================================== */

.pointless-pos-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================
   PRICING (Flower Pricing Table)
===================================================== */

.pointless-pos-pricing .pointless-pos-price-header,
.pointless-pos-pricing .pointless-pos-price-row {
  display: grid;
  grid-template-columns: 160px repeat(5, 1fr);
  gap: 16px;
  align-items: center;
}

.pointless-pos-pricing .pointless-pos-price-header {
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.pointless-pos-pricing .pointless-pos-tier-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.pointless-pos-pricing > .pointless-pos-price-row {
  margin-bottom: 18px;
}

/* Mobile pricing */
@media (max-width: 768px) {

  .pointless-pos-pricing .pointless-pos-price-header {
    display: none;
  }

  .pointless-pos-pricing .pointless-pos-price-row {
    grid-template-columns: 1fr 1fr;
  }

  .pointless-pos-pricing .pointless-pos-price-row > div {
    text-align: center;
  }

  .pointless-pos-pricing .pointless-pos-tier-name {
    grid-column: span 2;
    text-align: left;
  }
}

/* =====================================================
   ITEMS (Category Item List)
===================================================== */
/* FORCE anchors to behave as real grid items */
.pointless-pos-items .pointless-pos-item-list > a {
  display: block !important;
  float: none !important;
  max-width: 100% !important;
  width: 100% !important;
}

.pointless-pos-items .pointless-pos-item-list > .pointless-pos-item-row-link {
  width: 100%;
}

/* DEFAULT: stacked list (1 column) */
.pointless-pos-items .pointless-pos-item-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* 2+ columns = grid */
.pointless-pos-cols-2 .pointless-pos-item-list,
.pointless-pos-cols-3 .pointless-pos-item-list,
.pointless-pos-cols-4 .pointless-pos-item-list,
.pointless-pos-cols-5 .pointless-pos-item-list,
.pointless-pos-cols-6 .pointless-pos-item-list {
  display: grid;
  grid-template-columns: repeat(var(--pointless-pos-columns), 1fr);
  gap: 16px;
}
.pointless-pos-items .pointless-pos-item-row {
  display: grid;
  grid-template-columns: 120px 1fr 160px;
  gap: 16px;
  align-items: start;
}

/* Image */
.pointless-pos-items .pointless-pos-item-image {
  align-self: center;
}

.pointless-pos-items .pointless-pos-item-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Content */
.pointless-pos-items .pointless-pos-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pointless-pos-items .pointless-pos-item-category {
  font-size: .9em;
}

.pointless-pos-items .pointless-pos-item-name {
  font-size: 1.1em;
}

.pointless-pos-items .pointless-pos-item-brand {}
.pointless-pos-items .pointless-pos-item-potency {}

/* Actions */
.pointless-pos-items .pointless-pos-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  align-self: center;
}

.pointless-pos-items .pointless-pos-item-price {}
.pointless-pos-items .pointless-pos-add-btn {}

/* Mobile items */
@media (max-width: 768px) {

  .pointless-pos-items .pointless-pos-item-row {
    grid-template-columns: 100px 1fr;
  }

  .pointless-pos-items .pointless-pos-item-actions {
    grid-column: span 2;
    align-items: flex-start;
  }
}

.pointless-pos-item-row-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.pointless-pos-item-row-link:hover {
  text-decoration: none;
}

pointless-pos-item-brandname {
    font-size: 0.85em;
    line-height: 1.2;
    opacity: 0.75;
    margin-top: 2px;
}

/* =====================================================
   CATEGORIES (Category Grid)
===================================================== */

.pointless-pos-categories .pointless-pos-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 5px;
  margin: 30px 0;
  align-items: stretch;
}

.pointless-pos-categories .pointless-pos-category-card {
  width: 90px;
  height: 90px;
  padding: 6px;
  box-sizing: border-box;
  background: #eef6f3;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.pointless-pos-categories .pointless-pos-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.1);
}

.pointless-pos-categories .pointless-pos-category-image {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.pointless-pos-categories .pointless-pos-category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pointless-pos-categories .pointless-pos-category-label {
  font-size: 11px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  height: calc(1.2em * 2);
  max-height: calc(1.2em * 2);
}

/* =====================================================
   PRODUCT PAGE (STRUCTURE + DETAILS)
   - Main layout grid
   - Media column
   - Info column
   - Descriptions
   - THC / CBD badges
   - Meta tag chips
===================================================== */

.pointless-pos-product-details {
  display: flex;
  flex-direction: column;
  gap: 0;

  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* FULL-WIDTH TITLE */
.pointless-pos-product-title {
  margin: 0 0 28px 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.95);
}

/* TWO-COLUMN GRID */
.pointless-pos-product-columns {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 48px;
  align-items: start;
}

/* LEFT COLUMN (all fields) */
.pointless-pos-product-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* RIGHT COLUMN (image only) */
.pointless-pos-product-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pointless-pos-product-size {
  margin: 0;
}

.pointless-pos-product-size .pointless-pos-chip {
  font-size: 0.95rem;
  padding: 6px 14px;
}

.pointless-pos-stock-status {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.pointless-pos-stock-status.in-stock {
  background: #e8f5e9;
  color: #2e7d32;
}

.pointless-pos-stock-status.call-availability {
  background: #fff3e0;
  color: #e65100;
}

.pointless-pos-product-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 0;
}

/* Labeled features */
.pointless-pos-feature {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pointless-pos-feature-label {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  min-width: 70px;
  flex-shrink: 0;
}

.pointless-pos-feature-value {
  color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pointless-pos-feature-value span {
    display: inline-flex;
    align-items: center;
}

/* Icon styling for feature labels */
.pointless-pos-category-icon {
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.pointless-pos-origin-icon,
.pointless-pos-species-icon {
    font-size: 1.1rem;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

.pointless-pos-country-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pointless-pos-flag-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* Optional: price + cart grouping */
.pointless-pos-product-purchase {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pointless-pos-product-section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

/* Short description (lead paragraph) */
.pointless-pos-product-short-description {
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 18px;
  color: rgba(0, 0, 0, 0.85);
}

/* Long description */
.pointless-pos-product-long-description {
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.75);
}

.pointless-pos-product-long-description p {
  margin-bottom: 14px;
}

/* THC / CBD badges */
.pointless-pos-product-badges {
  display: flex;
  gap: 8px;
  margin: 10px 0 18px;
  flex-wrap: wrap;
}

.pointless-pos-badge {
  padding: 4px 10px;
  font-size: .8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

/* Meta tag chips */
.pointless-pos-product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.pointless-pos-product-tag {
  padding: 6px 12px;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.75);
}

/* Item barcode */
.pointless-pos-item-barcode {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
  font-family: monospace;
  letter-spacing: 0.5px;
}

/* Item price */
.pointless-pos-item-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ppos-color-price, #2e7d32);
}

/* Modern add to cart button */
.pointless-pos-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
  letter-spacing: 0.3px;
}

.pointless-pos-add-to-cart:hover:not(:disabled) {
  background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.4);
  transform: translateY(-1px);
}

.pointless-pos-add-to-cart:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(46, 125, 50, 0.3);
}

.pointless-pos-add-to-cart:disabled {
  background: #bdbdbd;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Add-to-cart button states — keyed on data attribute so they work across all CSS prefixes */
[data-pointless-add-to-cart].ppos-adding {
  pointer-events: none;
  opacity: 0.7;
}

[data-pointless-add-to-cart].ppos-added {
  pointer-events: none;
}

/* Mobile */
@media (max-width: 900px) {
  .pointless-pos-product-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pointless-pos-product-title {
    font-size: 1.5rem;
  }

  /* 2-column grid: label | value — no stacking */
  .pointless-pos-feature {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2px 10px;
    align-items: start;
  }

  .pointless-pos-feature-label {
    min-width: auto;
  }

  /* Hide decorative icon spans so the 2-col grid stays clean */
  .pointless-pos-feature-label--icon {
    display: none;
  }
}

/* =====================================================
   BRAND DISPLAY
   [pointless_pos_brand id="..."] / product page section
===================================================== */

.pointless-pos-product-brand-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pointless-pos-brand-display {
  width: 100%;
}

.pointless-pos-brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: rgba(0, 0, 0, 0.9);
}

.pointless-pos-brand-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}

.pointless-pos-brand-grid--no-image {
  grid-template-columns: 1fr;
}

.pointless-pos-brand-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.75);
}

.pointless-pos-brand-body p { margin-bottom: 14px; }
.pointless-pos-brand-body p:last-child { margin-bottom: 0; }

/* ── Slider ─────────────────────────────────── */

.pointless-pos-brand-image-wrap {
  position: relative;
}

.pp-pos-slider {
  position: relative;
  width: 150px;
  user-select: none;
}

.pp-pos-slide {
  display: none;
}

.pp-pos-slide.active {
  display: block;
}

.pp-pos-slide img {
  width: 150px;
  height: 120px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  border-radius: 6px;
  background: #f4f4f4;
}

.pp-pos-prev,
.pp-pos-next {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
  z-index: 2;
}

.pp-pos-prev:hover,
.pp-pos-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

.pp-pos-prev { left: -14px; }
.pp-pos-next { right: -14px; }

.pp-pos-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 8px;
}

.pp-pos-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s;
}

.pp-pos-dot.active {
  background: rgba(0, 0, 0, 0.65);
}

.pp-pos-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.pp-pos-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  line-height: 0;
  transition: border-color 0.15s;
}

.pp-pos-thumb img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: #f4f4f4;
}

.pp-pos-thumb.active {
  border-color: rgba(0, 0, 0, 0.65);
}

/* ── Lightbox ───────────────────────────────── */

.pp-pos-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.pp-pos-lightbox.active {
  display: flex;
}

.pp-pos-lb-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
}

.pp-pos-lb-inner img {
  max-width: 80vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.pp-pos-lb-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.8;
}

.pp-pos-lb-close:hover { opacity: 1; }

.pp-pos-lb-prev,
.pp-pos-lb-next {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  padding: 0;
}

.pp-pos-lb-prev:hover,
.pp-pos-lb-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Product slider overrides (fills the right column) ── */

.pp-pos-slider--product {
  width: 100%;
}

.pp-pos-slider--product .pp-pos-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f4f4f4;
}

.pp-pos-slider--product .pp-pos-prev { left: 8px; }
.pp-pos-slider--product .pp-pos-next { right: 8px; }

/* ── Responsive ─────────────────────────────── */

@media (max-width: 600px) {
  .pointless-pos-brand-grid {
    grid-template-columns: 1fr;
  }

  .pp-pos-slider,
  .pp-pos-slide img {
    width: 100%;
    height: auto;
  }
}

/* ── Dark mode ──────────────────────────────── */

@media (prefers-color-scheme: dark) {
  .pointless-pos-brand-name {
    color: rgba(255, 255, 255, 0.9);
  }

  .pointless-pos-brand-body {
    color: rgba(255, 255, 255, 0.75);
  }

  .pointless-pos-product-brand-section {
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  .pp-pos-slide img {
    background: rgba(255, 255, 255, 0.05);
  }

  .pp-pos-dot {
    background: rgba(255, 255, 255, 0.25);
  }

  .pp-pos-dot.active {
    background: rgba(255, 255, 255, 0.8);
  }

  .pp-pos-thumb img {
    background: rgba(255, 255, 255, 0.05);
  }

  .pp-pos-thumb.active {
    border-color: rgba(255, 255, 255, 0.8);
  }
}

/* =====================================================
   NOTICES (API errors, warnings)
===================================================== */

.pointless-pos-notice {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pointless-pos-notice--error {
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  color: #b91c1c;
}

.pointless-pos-notice--warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.pointless-pos-notice details {
  margin-top: 10px;
  font-size: 0.85rem;
}

.pointless-pos-notice details summary {
  cursor: pointer;
  opacity: 0.75;
}

.pointless-pos-notice details pre {
  margin-top: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
}

/* =====================================================
   HIDE THEME PAGE TITLE SPACE (PRODUCT ROUTES ONLY)
===================================================== */

/* FORCE REMOVE EMPTY DIVI PAGE TITLE */
h1.entry-title.main_title:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Safety: collapse any residual spacing */
h1.entry-title.main_title {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Remove Divi top padding when rendering a PointlessPOS product page */
#main-content .container:has(.pointless-pos-product) {
  padding-top: 0 !important;
}

/* Force PointlessPOS containers to use full width */
#main-content .container:has(.pointless-pos-items),
#main-content .container:has(.pointless-pos-categories),
#main-content .container:has(.pointless-pos-advanced-search),
#main-content .container:has(.pointless-pos-product),
#main-content .container:has(.pointless-pos-product-display) {
  max-width: 100% !important;
  width: 100% !important;
}

/* Ensure shortcode containers expand fully */
.pointless-pos-items,
.pointless-pos-categories,
.pointless-pos-advanced-search,
.pointless-pos-product,
.pointless-pos-product-display {
  width: 100% !important;
  max-width: none !important;
}

/* ── PRODUCT PAGE WIDTH ──────────────────────────────
   Change max-width here to control how wide the product
   page content can grow. Use a px value (e.g. 1200px)
   or 100% for full-width.
   ─────────────────────────────────────────────────── */
.pointless-pos-product-details {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   BreadCrumbs
   ===================================================== */
.pointless-pos-breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: inherit;
}

.pointless-pos-breadcrumbs a {
  text-decoration: none;
  opacity: 0.85;
}

.pointless-pos-breadcrumbs a:hover {
  text-decoration: underline;
}

.pointless-pos-breadcrumbs .sep {
  margin: 0 0.4em;
  opacity: 0.5;
}

.pointless-pos-catalog-cart-link {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    height: 45px;
}

.pointless-pos-cart-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 1em;
    border: 2px solid #2e7d32;
    border-radius: 8px;
    background-color: #2e7d32;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    max-height: 45px;
}

.pointless-pos-cart-button:hover {
    background-color: #1b5e20;
    border-color: #1b5e20;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pointless-pos-cart-icon {
    font-size: 1.2rem;
}

.pointless-pos-cart-label {
    display: inline;
    padding: 1em;
}

.pointless-pos-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background-color: #fff;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .pointless-pos-cart-button {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .pointless-pos-cart-label {
        display: none;
        padding: 1em;
    }
}

/* =====================================================
   RESPONSIVE VISIBILITY HELPERS
===================================================== */

@media (max-width: 768px) {
  .pointless-pos-hide-on-mobile {
    display: none !important;
  }
}

/* =====================================================
   SEARCH INPUT
==================================================== */

.pointless-pos-search-container {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pointless-pos-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    color: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.pointless-pos-search-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.pointless-pos-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.pointless-pos-search-category {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.pointless-pos-search-category-label {
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
}

.pointless-pos-search-category-name {
    padding: 6px 12px;
    background: #2e7d32;
    color: #fff;
    border-radius: 20px;
    font-weight: 500;
}

.pointless-pos-search-clear-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pointless-pos-search-clear-category:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.pointless-pos-item-list.pointless-pos-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.pointless-pos-item-list.pointless-pos-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #2e7d32;
    border-radius: 50%;
    animation: pointless-pos-spin 0.8s linear infinite;
}

@keyframes pointless-pos-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .pointless-pos-search-container {
        padding: 12px;
        margin: 16px 0;
    }

    .pointless-pos-search-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
}

@media (prefers-color-scheme: dark) {
    .pointless-pos-search-container {
        background: rgba(255, 255, 255, 0.05);
    }

    .pointless-pos-search-input {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: inherit;
    }

    .pointless-pos-search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .pointless-pos-search-input:focus {
        border-color: rgba(46, 125, 50, 0.8);
        box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
    }

    .pointless-pos-search-clear-category {
        background: rgba(255, 255, 255, 0.1);
    }

    .pointless-pos-search-clear-category:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* =====================================================
   SPA TRANSITION OVERLAY
   Fade out old content, spinner while fetching, fade in new.
   ===================================================== */

#pointless-pos-spa-content {
    position: relative;
    opacity: 1;
    transition: opacity 0.25s ease;
}

#pointless-pos-spa-content.pointless-pos-spa-fade-out {
    opacity: 0;
    pointer-events: none;
}

#pointless-pos-spa-content.pointless-pos-spa-fade-in {
    opacity: 0;
}

.pointless-pos-spa-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99998;
    align-items: center;
    justify-content: center;
}

.pointless-pos-spa-loading.active {
    display: flex;
}

.pointless-pos-spa-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #2e7d32;
    border-radius: 50%;
    animation: pointless-pos-spin-spa 0.8s linear infinite;
}

@keyframes pointless-pos-spin-spa {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-color-scheme: dark) {
    .pointless-pos-spa-loading {
        background: rgba(30, 30, 30, 0.95);
    }

    .pointless-pos-spa-loading::after {
        border-color: rgba(255, 255, 255, 0.1);
        border-top-color: #4caf50;
    }
}

/* Top progress bar — instant feedback on every SPA navigation */
.pointless-pos-spa-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #2e7d32, #66bb6a);
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pointless-pos-spa-progress-bar.active {
    opacity: 1;
    width: 75%;
    transition: opacity 0.15s ease, width 8s cubic-bezier(0.05, 0.8, 0.3, 1);
}

.pointless-pos-spa-progress-bar.complete {
    width: 100%;
    opacity: 0;
    transition: width 0.15s ease, opacity 0.25s ease 0.1s;
}