/* Reusable UI components – Forest & Copper */

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-family: var(--font-data);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.status-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pill--available {
  background: var(--s-avail-bg);
  color: var(--s-avail-text);
  border: 1px solid var(--s-avail-bd);
}
.status-pill--available .status-pill__dot { background: var(--s-avail-dot); }

.status-pill--low {
  background: var(--s-low-bg);
  color: var(--s-low-text);
  border: 1px solid var(--s-low-bd);
}
.status-pill--low .status-pill__dot { background: var(--s-low-dot); }

.status-pill--sold {
  background: var(--s-sold-bg);
  color: var(--s-sold-text);
  border: 1px solid var(--s-sold-bd);
}
.status-pill--sold .status-pill__dot { background: var(--s-sold-dot); }

.status-pill--batch {
  background: var(--s-hold-bg);
  color: var(--s-hold-text);
  border: 1px solid var(--s-hold-bd);
}
.status-pill--batch .status-pill__dot { background: var(--s-hold-dot); }

.status-pill--review {
  background: var(--s-review-bg);
  color: var(--s-review-text);
  border: 1px solid var(--s-review-bd);
}
.status-pill--review .status-pill__dot { background: var(--s-review-dot); }

/* Primary — Copper. Used for: Add to Cart, Submit Order, Verify License */
.btn-primary-moov {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 22px;
  background: var(--copper);
  color: var(--copper-contrast, #fff);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary-moov:hover {
  background: var(--copper-hover);
}

/* <a> inherits global link :hover color in some stacks — keep button contrast */
a.btn-primary-moov:hover,
a.btn-primary-moov:focus {
  color: var(--copper-contrast, #fff);
  text-decoration: none;
  background: var(--copper-hover);
}

.btn-primary-moov:active {
  background: var(--copper-active);
}

a.btn-primary-moov:active {
  color: var(--copper-contrast, #fff);
  text-decoration: none;
  background: var(--copper-active);
}

.btn-primary-moov:disabled,
.btn-primary-moov.disabled {
  background: #E0E0E0;
  color: #9E9E9E;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary-moov:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* Full-width variant for primary button (e.g. auth submit) */
.btn-primary-moov--block {
  width: 100%;
}

/* Ghost — Forest outline. Used for: Download COA, secondary actions */
.btn-ghost-moov {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 20px;
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-ghost-moov:hover {
  background: var(--forest);
  color: #fff;
}

.btn-ghost-moov:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

/* Compact ghost variant for inline controls (e.g. password toggle) */
.btn-ghost-moov--compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

/* Danger — Red. Used for: license expired lockouts ONLY */
.btn-danger-locked {
  min-height: 44px;
  background: #E0E0E0;
  color: #9E9E9E;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: not-allowed;
  width: 100%;
}

/* Form fields */
.field {
  margin-bottom: 16px;
}

.field__label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--charcoal);
  background: var(--bg);
  transition: border-color 0.15s;
  appearance: none;
}

.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--copper);
}

.field__input--mono {
  font-family: var(--font-data);
}

.field__error {
  font-family: var(--font-data);
  font-size: 10px;
  color: var(--red);
  margin-top: 4px;
}

/* Potency badges */
.potency-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 5px;
  padding: 2px 8px;
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
}

.potency-badge--thc {
  background: var(--forest-light);
  color: var(--forest);
}

.potency-badge--cbd {
  background: #EEF4F7;
  color: #2E5D7A;
}

/* Tax card */
.tax-card {
  background: #F3F4F6;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--forest);
  padding: 18px 20px;
}

.tax-card__title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tax-card__total {
  font-family: var(--font-data);
  font-size: 20px;
  font-weight: 800;
  color: var(--forest);
}

/* Compliance banner */
.compliance-banner {
  background: var(--red-light);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.compliance-banner__icon {
  color: var(--red);
  flex-shrink: 0;
}

.compliance-banner__title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

.compliance-banner__body {
  font-family: var(--font-data);
  font-size: 10px;
  color: #B71C1C;
  margin-top: 2px;
  line-height: 1.5;
}


/* NEW badge */
.badge-new {
  display: inline-flex;
  align-items: center;
  background: var(--copper);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-family: var(--font-data);
  font-size: 9px;
  font-weight: 700;
}

/* Batch overlay on card image */
.moov-card-batch-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(var(--forest-rgb), 0.9);
  backdrop-filter: blur(4px);
  border-radius: 5px;
  padding: 4px 8px;
}

.moov-card-batch-label {
  display: block;
  font-family: var(--font-data);
  font-size: 8px;
  color: #A8C4BB;
  letter-spacing: 0.5px;
}

.moov-card-batch-value {
  display: block;
  font-family: var(--font-data);
  font-size: 9px;
  color: #fff;
  font-weight: 700;
}

/* Card overlay badges (top-left) */
.moov-card-overlays-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
  padding: 10px;
  z-index: 2;
  pointer-events: none;
}

.moov-card-overlays-top > * {
  pointer-events: auto;
}

/* Card body */
.moov-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 8px;
}

/* Eyebrow (category / strain) */
.moov-card-eyebrow {
  font-family: var(--font-data);
  font-size: 9px;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
  line-height: 1.3;
}

/* Card title */
.moov-card-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--charcoal);
}

.moov-card-title a {
  color: inherit;
  text-decoration: none;
}

.moov-card-title a:hover {
  color: var(--forest);
}

/* Card description / subtitle */
.moov-card-description {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Effect chips on cards / list rows */
.moov-card-effects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 8px 0 4px;
}

.effect-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--forest);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), var(--forest-light));
  border: 1px solid var(--forest-border);
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: 0 1px 0 rgba(17, 24, 21, 0.06);
}

.effect-chip--more {
  color: var(--text-muted);
  background: var(--sage-bg);
  border-color: var(--border);
  font-weight: 700;
  cursor: default;
}

/* Product card overrides (Forest & Copper) */
.moov-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.moov-product-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--forest-border);
  transform: translateY(-2px);
}

.moov-product-card--sold-out {
  opacity: 0.88;
}

.moov-product-card--sold-out:hover {
  opacity: 1;
}

/* Card image wrapper — clickable, clips zoom */
.moov-product-card-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--sage-bg);
  cursor: pointer;
}

/* Card image */
.moov-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.moov-product-card:hover .moov-card-img {
  transform: scale(1.04);
}

/* Grayscale for sold out */
.grayscale {
  filter: grayscale(70%) brightness(0.95);
}

/* Quick View hover hint — bottom of image */
.moov-card-quickview-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  background: linear-gradient(to top, rgba(18,43,37,0.88), rgba(18,43,37,0.4) 70%, transparent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.moov-product-card:hover .moov-card-quickview-hint {
  opacity: 1;
  transform: translateY(0);
}

/* QOH label */
.moov-qoh {
  display: block;
  font-family: var(--font-data);
  font-size: 9px;
  color: var(--text-light);
  margin-top: 4px;
}

/* Row view */
.product-row__badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.product-row__batch {
  font-family: var(--font-data);
  font-size: 9px;
  color: var(--text-light);
}

.product-row__effects.moov-card-effects {
  margin-top: 8px;
  margin-bottom: 0;
}

.product-row__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: 16px;
  flex-shrink: 0;
}

.product-row__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.product-row__thumb-link {
  flex-shrink: 0;
  margin-right: 14px;
  cursor: pointer;
}

.moov-product-row {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.moov-product-row:hover {
  border-color: var(--forest-border);
  box-shadow: var(--shadow-card);
}

.moov-product-row--sold-out {
  opacity: 0.85;
}

.moov-product-row--sold-out:hover {
  opacity: 1;
}

/* Compact button variant */
.btn-primary-moov--compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

/* Small qty wrap for row view */
.moov-qty-wrap--small {
  display: flex;
  gap: 6px;
  align-items: center;
}

.moov-qty-wrap--small .moov-qty-input {
  width: 50px;
}

/* Potency row spacing */
.potency-row {
  display: flex;
  gap: 5px;
  margin: 6px 0;
  flex-wrap: wrap;
}

/* Price mode pill (Wholesale / MSRP label) */
.price-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: var(--radius-pill);
  background: var(--forest-light);
  color: var(--forest);
  font-family: var(--font-data);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   Toast notifications (bootstrap-notify template)
   Used by toast() in b2b.js and direct $.notify calls.
   Must live here (components.css) so every header variant
   loads it — including portal/sales_header which does not
   include stylesheet.css.
   ───────────────────────────────────────────── */
.moov-toast {
  position: relative;
  display: block;
  padding: 14px 44px 14px 16px;
  border-radius: var(--radius-md);
  border: none;
  background-color: var(--charcoal);
  color: #fff;
  box-shadow: var(--shadow-hover);
  max-width: 380px;
  min-width: 260px;
  line-height: 1.45;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  opacity: 1;
}
.moov-toast .fa,
.moov-toast .material-icons {
  margin-right: 10px;
  vertical-align: middle;
  font-size: 16px;
  line-height: 1;
}
.moov-toast .material-icons {
  font-size: 18px;
}
.moov-toast [data-notify="message"] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.moov-toast-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  opacity: 0.75;
  cursor: pointer;
  padding: 0;
  color: inherit;
  text-shadow: none;
}
.moov-toast-close:hover,
.moov-toast-close:focus {
  opacity: 1;
  outline: none;
}
.moov-toast-success {
  background-color: var(--forest);
  color: #fff;
  box-shadow: 0 10px 28px rgba(var(--forest-rgb), 0.28), 0 2px 8px rgba(0, 0, 0, 0.12);
}
.moov-toast-success .fa,
.moov-toast-success .material-icons {
  color: #A5D6A7;
}
.moov-toast-danger {
  background-color: var(--red);
  color: #fff;
  box-shadow: 0 10px 28px rgba(192, 57, 43, 0.32), 0 2px 8px rgba(0, 0, 0, 0.12);
}
.moov-toast-danger .fa,
.moov-toast-danger .material-icons {
  color: #FFE2DF;
}
.moov-toast-info {
  background-color: var(--charcoal);
  color: #fff;
}
.moov-toast-info .fa,
.moov-toast-info .material-icons {
  color: var(--copper-border);
}
.moov-toast-warning {
  background-color: #BF360C;
  color: #fff;
}
.moov-toast-warning .fa,
.moov-toast-warning .material-icons {
  color: #FFCC80;
}

/* Fallback toast (no jQuery / bootstrap-notify available) */
.moov-toast-fallback {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99999;
  max-width: 380px;
  min-width: 260px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  background-color: var(--charcoal);
  box-shadow: var(--shadow-hover);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}
.moov-toast-fallback.moov-toast-success {
  background-color: var(--forest);
}
.moov-toast-fallback.moov-toast-danger {
  background-color: var(--red);
}
.moov-toast-fallback.moov-toast-info {
  background-color: var(--charcoal);
}


/* Staff "acting as" impersonation banner — shown across the very top of the catalog
 * header when a salesperson has an active "Start Order" supervised context, so they
 * never confuse themselves for the customer they're shopping for after re-opening
 * the site. */
.staff-acting-banner {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: linear-gradient(90deg, #b34700 0%, #d05500 100%);
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.staff-acting-banner__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.staff-acting-banner__icon {
  font-size: 22px;
  flex: 0 0 auto;
}
.staff-acting-banner__text {
  flex: 1 1 auto;
  min-width: 0;
}
.staff-acting-banner__label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-right: 6px;
  font-size: 12px;
}
.staff-acting-banner__customer {
  font-weight: 600;
}
.staff-acting-banner__branch {
  opacity: 0.85;
  margin-left: 4px;
}
.staff-acting-banner__form {
  margin: 0;
  flex: 0 0 auto;
}
.staff-acting-banner__exit-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.staff-acting-banner__exit-btn:hover,
.staff-acting-banner__exit-btn:focus-visible {
  background: rgba(255, 255, 255, 0.32);
  outline: none;
}
