/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ===== Brand & Secondary Colors ===== */
:root {
  /* Brand Primary */
  --brand-primary: #2468EA;
  --core-bright-blue: #64E1FF;
  --core-ocean-blue: #00304B;
  --core-mist-blue: #EAEEF0;

  /* Secondary Colors (Light Mode) */
  --secondary-orange: #FFC091;
  --secondary-yellow: #FFEB69;
  --secondary-blue: #A0E1E1;
  --secondary-pink: #FFD7EF;

  /* Status Colors (Light Mode) - uses secondary colors */
  --status-in-stock: #FFC091;
  --status-in-stock-text: #1a1a1a;
  --status-listed: #FFEB69;
  --status-listed-text: #1a1a1a;
  --status-sold: #A0E1E1;
  --status-sold-text: #1a1a1a;
  --status-defective: #FFD7EF;
  --status-defective-text: #1a1a1a;
}

html[data-theme="dark"] {
  /* Secondary Colors (Dark Mode) */
  --secondary-orange: #260A2F;
  --secondary-yellow: #3A341C;
  --secondary-blue: #21231D;
  --secondary-pink: #320707;

  /* Status Colors (Dark Mode) */
  --status-in-stock: #260A2F;
  --status-in-stock-text: #FFC091;
  --status-listed: #3A341C;
  --status-listed-text: #FFEB69;
  --status-sold: #21231D;
  --status-sold-text: #A0E1E1;
  --status-defective: #320707;
  --status-defective-text: #FFD7EF;
}

/* Design system helpers */
.design-colors__core-shift {
  filter: hue-rotate(110deg);
}

/* Inventory item row chevron rotation when details is open */
details[open] .inventory-chevron {
  transform: rotate(90deg);
}

/* Make hover background have equal padding on all sides (6px) */
.inventory-table__row::after {
  left: 6px !important;
  right: 6px !important;
}

/* Inventory item row highlight when expanded - matches hover ::after styling */
details[open] > summary.inventory-table__row::after {
  background-color: color-mix(in oklab, var(--primary) 10%, transparent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  bottom: 0;
}

details[open] > .inventory-expanded-content {
  position: relative;
  margin-left: 6px;
  margin-right: 6px;
  margin-bottom: 6px;
  padding-left: calc(1.25rem - 6px);
  padding-right: calc(1.25rem - 6px);
  background-color: color-mix(in oklab, var(--primary) 10%, transparent);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Make form field containers transparent to show expanded row background (exclude modals) */
details[open] > .inventory-expanded-content .bg-\[var\(--surface2\)\]:not(.inventory-status__modal-panel) {
  background-color: transparent !important;
}

/* Modal overlay - ensure it covers everything */
.inventory-status__modal-overlay {
  z-index: 9999 !important;
}

/* Keep modal panels with solid background */
.inventory-status__modal-panel {
  background-color: #ffffff !important;
  position: relative;
  z-index: 10000 !important;
}

html[data-theme="dark"] .inventory-status__modal-panel {
  background-color: #292d29 !important;
}

/* Make borders more visible inside expanded content (exclude status pills) */
details[open] > .inventory-expanded-content .border-\[var\(--border\)\]:not(.status-pill) {
  border-color: color-mix(in oklab, var(--text) 30%, transparent) !important;
}

/* Remove browser focus ring from inputs inside expanded content */
details[open] > .inventory-expanded-content input:focus,
details[open] > .inventory-expanded-content textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Make inventory table card background match page background */
.inventory-table__card {
  background: var(--bg) !important;
}

/* Adjust grid columns to fit status chip in one row */
.inventory-table__grid {
  grid-template-columns: 36px minmax(180px, 2.5fr) minmax(70px, 0.6fr) minmax(100px, 0.8fr) minmax(110px, 0.85fr) 28px !important;
}

/* Prevent status badge text from wrapping */
.status-badge {
  white-space: nowrap !important;
}

/* Profit cards use same gray as table frame background */
.profit-card {
  background: color-mix(in oklab, var(--text) 8%, transparent);
}

/* Brand blue for active category tag chips */
.category-tag-chip {
  background-color: #2468EA !important;
  border: none !important;
  color: white !important;
}

/* ===== Status Badge & Pill Overrides (Light Mode) ===== */
.status-badge--in_stock,
.peer:checked + .status-pill--in_stock {
  background-color: #FFC091 !important;
  color: #1a1a1a !important;
  border-color: #FFC091 !important;
  border-width: 2px !important;
  border-style: solid !important;
}

.status-badge--listed,
.peer:checked + .status-pill--listed {
  background-color: #FFEB69 !important;
  color: #1a1a1a !important;
  border-color: #FFEB69 !important;
  border-width: 2px !important;
  border-style: solid !important;
}

.status-badge--sold,
.peer:checked + .status-pill--sold {
  background-color: #A0E1E1 !important;
  color: #1a1a1a !important;
  border-color: #A0E1E1 !important;
  border-width: 2px !important;
  border-style: solid !important;
}

.status-badge--defective,
.peer:checked + .status-pill--defective {
  background-color: #FFD7EF !important;
  color: #1a1a1a !important;
  border-color: #FFD7EF !important;
  border-width: 2px !important;
  border-style: solid !important;
}

/* Status bar fills (Light Mode) */
.status-bar__fill--in_stock {
  background-color: #FFC091 !important;
}

.status-bar__fill--listed {
  background-color: #FFEB69 !important;
}

.status-bar__fill--sold {
  background-color: #A0E1E1 !important;
}

.status-bar__fill--defective {
  background-color: #FFD7EF !important;
}

/* Status bar container text colors (Light Mode) */
.status-bar-container:has(.status-bar__fill--in_stock),
.status-bar-container:has(.status-bar__fill--listed),
.status-bar-container:has(.status-bar__fill--sold),
.status-bar-container:has(.status-bar__fill--defective) {
  color: #1a1a1a !important;
}

/* ===== Status Badge & Pill Overrides (Dark Mode) ===== */
html[data-theme="dark"] .status-badge--in_stock,
html[data-theme="dark"] .peer:checked + .status-pill--in_stock {
  background-color: #260A2F !important;
  color: #FFC091 !important;
  border-color: #260A2F !important;
  border-width: 2px !important;
  border-style: solid !important;
}

html[data-theme="dark"] .status-badge--listed,
html[data-theme="dark"] .peer:checked + .status-pill--listed {
  background-color: #3A341C !important;
  color: #FFEB69 !important;
  border-color: #3A341C !important;
  border-width: 2px !important;
  border-style: solid !important;
}

html[data-theme="dark"] .status-badge--sold,
html[data-theme="dark"] .peer:checked + .status-pill--sold {
  background-color: #21231D !important;
  color: #A0E1E1 !important;
  border-color: #21231D !important;
  border-width: 2px !important;
  border-style: solid !important;
}

html[data-theme="dark"] .status-badge--defective,
html[data-theme="dark"] .peer:checked + .status-pill--defective {
  background-color: #320707 !important;
  color: #FFD7EF !important;
  border-color: #320707 !important;
  border-width: 2px !important;
  border-style: solid !important;
}

/* Status bar fills (Dark Mode) */
html[data-theme="dark"] .status-bar__fill--in_stock {
  background-color: #260A2F !important;
}

html[data-theme="dark"] .status-bar__fill--listed {
  background-color: #3A341C !important;
}

html[data-theme="dark"] .status-bar__fill--sold {
  background-color: #21231D !important;
}

html[data-theme="dark"] .status-bar__fill--defective {
  background-color: #320707 !important;
}

/* Status bar container text colors (Dark Mode) */
html[data-theme="dark"] .status-bar-container:has(.status-bar__fill--in_stock) {
  color: #FFC091 !important;
}

html[data-theme="dark"] .status-bar-container:has(.status-bar__fill--listed) {
  color: #FFEB69 !important;
}

html[data-theme="dark"] .status-bar-container:has(.status-bar__fill--sold) {
  color: #A0E1E1 !important;
}

html[data-theme="dark"] .status-bar-container:has(.status-bar__fill--defective) {
  color: #FFD7EF !important;
}

/* Remove borders from status bar containers in dark mode */
html[data-theme="dark"] .status-bar__fill {
  border: none !important;
}

/* Status bar container - remove border in dark mode */
html[data-theme="dark"] div:has(> .status-bar__fill) {
  border: none !important;
}

/* ===== Status Toggle Buttons (Inventory page) ===== */
.status-toggle-btn {
  color: var(--muted);
  transition: background-color 0.15s, color 0.15s;
}

.status-toggle-btn[data-active="true"] {
  background-color: var(--text);
  color: var(--bg);
}

/* ===== Segmented Control (Wise-style toggle) ===== */
.ds-segmented {
  position: relative;
  display: grid;
  align-items: center;
  padding: 4px;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--text) 8%, transparent);
  overflow: hidden;
}

.ds-segmented--2 {
  grid-template-columns: 1fr 1fr;
}

.ds-segmented--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Sliding pill indicator */
.ds-segmented::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  border-radius: 9999px;
  background: var(--surface2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

/* 2-option pill width */
.ds-segmented--2::before {
  width: calc(50% - 4px);
}

/* 3-option pill width */
.ds-segmented--3::before {
  width: calc(33.333% - 2.67px);
}

/* Pill positions for 2 options */
.ds-segmented--2[data-active="1"]::before {
  transform: translateX(0);
}

.ds-segmented--2[data-active="2"]::before {
  transform: translateX(100%);
}

/* Pill positions for 3 options */
.ds-segmented--3[data-active="1"]::before {
  transform: translateX(0);
}

.ds-segmented--3[data-active="2"]::before {
  transform: translateX(100%);
}

.ds-segmented--3[data-active="3"]::before {
  transform: translateX(200%);
}

/* Hide pill when no option is active (e.g., dropdown selection) */
.ds-segmented[data-active="0"]::before {
  opacity: 0;
  transform: translateX(-100%); /* Move off-screen for clean transition */
}

/* Segment button */
.ds-segment {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease;
}

.ds-segment:focus-visible {
  outline: 2px solid var(--focus_ring);
  outline-offset: 2px;
}

/* Active segment text */
.ds-segment[data-active="true"] {
  color: var(--text);
}

/* With icons */
.ds-segment__icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Mobile touch targets (WCAG 2.1 minimum 44px) */
@media (max-width: 767px) {
  .ds-segmented {
    padding: 6px;
  }

  .ds-segment {
    min-height: 44px;
    padding: 0 16px;
  }

  .ds-segmented--2::before,
  .ds-segmented--3::before {
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
  }

  .ds-segmented--2::before {
    width: calc(50% - 6px);
  }

  .ds-segmented--3::before {
    width: calc(33.333% - 4px);
  }
}

/* ===== Button Component Variants ===== */
/* Explicit CSS to ensure button colors work regardless of Tailwind scanning */

.btn-variant-primary {
  background-color: var(--primary);
  color: var(--primary_fg);
}

.btn-variant-primary:hover {
  background-color: var(--primary_hover);
}

.btn-variant-secondary {
  background-color: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-variant-secondary:hover {
  background-color: var(--surface);
}

.btn-variant-ghost {
  background-color: transparent;
  color: var(--text);
}

.btn-variant-ghost:hover {
  background-color: var(--surface);
}

.btn-variant-danger {
  background-color: var(--danger);
  color: var(--danger_fg);
}

.btn-variant-danger:hover {
  opacity: 0.9;
}

/* ===== Terminal CTA Button ===== */
/* Ocean blue bg with bright blue text, inverted in dark mode */
.btn-terminal-cta {
  background-color: var(--core-ocean-blue);
  color: var(--core-bright-blue);
  transition: transform 0.1s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-terminal-cta:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(0, 48, 75, 0.3);
}

.btn-terminal-cta:active {
  transform: scale(0.97);
  filter: brightness(0.95);
  box-shadow: 0 2px 8px rgba(0, 48, 75, 0.2);
}

.btn-terminal-cta:focus-visible {
  outline: 2px solid var(--core-bright-blue);
  outline-offset: 2px;
}

.link-terminal-cta {
  color: var(--core-bright-blue);
  transition: opacity 0.15s ease;
}

.link-terminal-cta:hover {
  opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
  .btn-terminal-cta {
    background-color: var(--core-bright-blue);
    color: var(--core-ocean-blue);
  }

  .btn-terminal-cta:hover {
    box-shadow: 0 6px 20px rgba(100, 225, 255, 0.3);
  }

  .btn-terminal-cta:active {
    box-shadow: 0 2px 8px rgba(100, 225, 255, 0.2);
  }

  .btn-terminal-cta:focus-visible {
    outline-color: var(--core-ocean-blue);
  }

  .link-terminal-cta {
    color: var(--core-ocean-blue);
  }
}

/* ===== Order Status Segmented Control ===== */
/* Matches theme toggle pattern from account menu */

.order-status-segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 44px;
  min-width: 200px;
  padding: 4px;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--text) 8%, transparent);
  overflow: hidden;
}

.order-status-segmented::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 9999px;
  background: var(--surface2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.order-status-segmented[data-active="in_stock"]::before {
  transform: translateX(100%);
}

.order-status-segment {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  padding: 0;
  border: none;
  cursor: pointer;
  transition: color 160ms ease;
}

.order-status-segment[aria-checked="true"] {
  color: var(--text);
}

.order-status-segment:focus-visible {
  outline: 2px solid var(--focus_ring);
  outline-offset: 2px;
}

/* ===== Arrival Date Modal Panel ===== */
/* Ensure modal has solid opaque background that stands out from page */

.arrival-modal__panel {
  /* Match account menu dropdown background */
  background-color: #292d29 !important;
  /* Subtle top highlight for elevation */
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06),
    transparent 50%
  );
}

/* Light mode: use white for clean appearance */
html[data-theme="light"] .arrival-modal__panel {
  background-color: #ffffff !important;
  background-image: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===== Order Items Table ===== */
/* 4-column grid for order items list on inventory page */

.order-items-table__grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(80px, 0.5fr) minmax(60px, 0.4fr) 28px;
  gap: 10px;
  align-items: center;
}

/* Hide last separator when using <a> elements instead of turbo-frame */
.inventory-table__card > a:last-child .inventory-table__separator {
  display: none;
}

/* Remove link underline - background hover is sufficient feedback */
.inventory-table__card > a {
  text-decoration: none;
}

/* ===== Typography: Display System ===== */
/* Based on design system: Archivo Black, bold, 85% line-height, 1.5% letter-spacing, uppercase */

/* Display Small - for item codes and secondary display elements */
.display-small {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

/* Display Medium - 40px mobile, 64px desktop */
.display-medium {
  font-family: 'Archivo Black', sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .display-medium {
    font-size: 64px;
  }
}

/* ===== Landing Page - Ocean Blue Hero ===== */
/* Replaces landing-dark-surface with ocean blue like header */
.landing-section-ocean-hero {
  background: var(--core-ocean-blue);
  color: #ffffff;
  /* Set CSS variables for components inside hero */
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.8);
  --subtle: rgba(255, 255, 255, 0.6);
  --surface: rgba(255, 255, 255, 0.08);
  --surface2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.15);
  --primary: var(--core-bright-blue);
  --primary_fg: var(--core-ocean-blue);
  --primary_hover: color-mix(in oklab, var(--core-bright-blue) 85%, white);
}

.landing-section-ocean-hero .lucro-logo-text {
  color: var(--core-bright-blue);
}

.landing-section-ocean-hero .logo-dark {
  display: block;
}

.landing-section-ocean-hero .logo-light {
  display: none;
}

/* Hero display typography on ocean background */
.landing-section-ocean-hero .landing-display-xl {
  color: var(--core-bright-blue);
}

.landing-section-ocean-hero .landing-display-lg,
.landing-section-ocean-hero .landing-display-md {
  color: #ffffff;
}

/* ===== Screenshot Browser Frame (Wise-style) ===== */
.landing-screenshot-frame {
  background: #1a1d21;
  border-radius: 12px;
  padding: 12px 12px 0;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.landing-screenshot-frame__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-screenshot-frame__dots {
  display: flex;
  gap: 6px;
}

.landing-screenshot-frame__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3d42;
}

.landing-screenshot-frame__dot--red {
  background: #ff5f57;
}

.landing-screenshot-frame__dot--yellow {
  background: #febc2e;
}

.landing-screenshot-frame__dot--green {
  background: #28c840;
}

.landing-screenshot-frame__url {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.landing-screenshot-frame__content {
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.landing-screenshot-frame__content img {
  display: block;
  width: 100%;
  height: auto;
}

/* Screenshot frame in hero - slightly elevated */
.landing-section-ocean-hero .landing-screenshot-frame {
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(100, 225, 255, 0.2);
}

/* ===== Landing Screenshot Flow (3-step visual) ===== */
.landing-screenshot-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 767px) {
  .landing-screenshot-flow {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.landing-screenshot-flow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.landing-screenshot-flow__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--core-bright-blue);
  color: var(--core-ocean-blue);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.landing-screenshot-flow__image {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
  margin-bottom: 16px;
}

.landing-screenshot-flow__label {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.landing-screenshot-flow__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

/* ===== Marketplace Product Card ===== */
/* Vestiaire Collective inspired - uses existing design tokens */

.product-card {
  background: var(--surface2);
  border-radius: var(--radius-medium);
  overflow: hidden;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
  background: var(--surface2-hover);
}

.group:hover .product-card {
  transform: translateY(-2px);
}

/* Product Image Container */
.product-card__image-container {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.group:hover .product-card__image {
  transform: scale(1.03);
}

.product-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface);
}

/* Condition Badge */
.product-card__badge {
  position: absolute;
  top: var(--size-12);
  left: var(--size-12);
  padding: var(--size-4) var(--size-8);
  background: var(--surface2);
  border-radius: var(--radius-small);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

/* Product Details */
.product-card__details {
  padding: var(--size-12) var(--size-12) var(--size-16);
}

.product-card__brand {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--size-4);
}

.product-card__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 var(--size-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__size {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: var(--size-8);
}

.product-card__price-container {
  display: flex;
  align-items: baseline;
  gap: var(--size-8);
}

.product-card__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.product-card__price--original {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: line-through;
}

/* ===== Marketplace Product Grid ===== */
/* Responsive: 2 cols mobile, 4 cols tablet, 5 cols desktop */

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--size-16);
}

@media (min-width: 768px) {
  .marketplace-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--size-24);
  }
}

@media (min-width: 1280px) {
  .marketplace-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== Marketplace Category Pills ===== */
.marketplace-category-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--size-8) var(--size-16);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.marketplace-category-pill--inactive {
  background: var(--surface2);
  color: var(--muted);
}

.marketplace-category-pill--inactive:hover {
  background: var(--surface2-hover);
  color: var(--text);
}

.marketplace-category-pill--active {
  background: var(--text);
  color: var(--bg);
}

/* ===== Marketplace Search ===== */
.marketplace-search {
  display: flex;
  gap: var(--size-12);
  width: 100%;
}

.marketplace-search__input {
  flex: 1;
  padding: var(--size-12) var(--size-16);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.marketplace-search__input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg);
}

.marketplace-search__input::placeholder {
  color: var(--muted);
}

/* ===== Marketplace Empty State ===== */
.marketplace-empty {
  text-align: center;
  padding: var(--size-64) var(--size-24);
}

.marketplace-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--size-16);
  color: var(--muted);
}

.marketplace-empty__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--size-8);
}

.marketplace-empty__text {
  font-size: 14px;
  color: var(--muted);
}

/* ===== Verify Order Page - Responsive Document Layout ===== */
/* Mobile: single column, document on top. Desktop: two-column grid. */

.verify-mobile-doc {
  display: block;
}

.verify-desktop-doc {
  display: none;
}

.verify-layout {
  display: block;
}

@media (min-width: 768px) {
  .verify-mobile-doc {
    display: none;
  }

  .verify-desktop-doc {
    display: block;
    position: sticky;
    top: 1rem;
    align-self: start;
  }

  .verify-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ===== Document Viewer Modal - Image Styling ===== */
/* Ensures image fills modal container and is centered for zoom/pan */
[data-document-viewer-target="container"] img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
}

/* ===== Search Pill (matches ds-input-container focus behavior) ===== */
.search-pill {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 30%, transparent);
  border-radius: 9999px;
  transition: border-color 0.15s ease;
}

.search-pill:focus-within {
  border-color: color-mix(in oklab, var(--text) 60%, transparent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--text) 15%, transparent);
}

/* Kill browser focus indicators on inputs inside search pill */
.search-pill input {
  outline: none !important;
  box-shadow: none !important;
}

/* Kill Safari's blue focus rectangle on all design system inputs */
.ds-input-container input:focus,
.ds-input-container input:focus-visible,
.ds-input:focus,
.ds-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ===== Brand Logo Theme Switching ===== */
/* Light variant visible by default, dark variant hidden */
.brand-logo--dark { display: none; }
.brand-logo--light { display: inline-block; }

/* Dark mode: swap variants */
html[data-theme="dark"] .brand-logo--light { display: none; }
html[data-theme="dark"] .brand-logo--dark { display: inline-block; }
