/*!
 * aiwt-stock.css — companion styles for aiwt-stock.js
 * Scoped to .aiwt-stock-widget so it cannot leak into the host site.
 * Tweak the CSS variables on the root element to retheme without
 * rebuilding the file. (You can override these on any wrapper.)
 */

.aiwt-stock-widget {
  --aiwt-bg: #00111f;
  --aiwt-card-bg: rgba(255,255,255,0.03);
  --aiwt-card-border: rgba(24, 144, 215, 0.18);
  --aiwt-accent: #01add3;
  --aiwt-accent-2: #1890d7;
  --aiwt-text: #fff;
  --aiwt-text-dim: rgba(255,255,255,0.62);
  --aiwt-text-faint: rgba(255,255,255,0.4);
  --aiwt-instock: #4ade80;
  --aiwt-supplier: #fbbf24;
  --aiwt-radius: 12px;
  --aiwt-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--aiwt-text);
  background: var(--aiwt-bg);
  border-radius: var(--aiwt-radius);
  padding: 16px;
}

.aiwt-stock-widget * { box-sizing: border-box; }

.aiwt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.aiwt-filter-input {
  background: #001226;
  border: 1px solid #06345e;
  color: var(--aiwt-text);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
}
.aiwt-filter-input:focus {
  outline: none;
  border-color: var(--aiwt-accent);
  box-shadow: 0 0 0 3px rgba(1,173,211,0.15);
}
.aiwt-stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 13px;
  color: var(--aiwt-text-dim);
  cursor: pointer;
}
.aiwt-stock-toggle input { accent-color: var(--aiwt-accent); }

.aiwt-status {
  font-family: var(--aiwt-mono);
  font-size: 11px;
  color: var(--aiwt-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 8px 0 16px;
}

.aiwt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.aiwt-card {
  display: flex;
  flex-direction: column;
  background: var(--aiwt-card-bg);
  border: 1px solid var(--aiwt-card-border);
  border-radius: var(--aiwt-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--aiwt-text);
  transition: border-color 120ms, transform 120ms;
}
.aiwt-card:hover {
  border-color: var(--aiwt-accent);
  transform: translateY(-2px);
}

.aiwt-card-image {
  aspect-ratio: 1;
  background: rgba(0, 18, 38, 0.5);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.aiwt-card-image img {
  width: 100%; height: 100%; object-fit: contain;
}
.aiwt-card-image-placeholder {
  font-size: 48px;
  color: rgba(255,255,255,0.12);
}

.aiwt-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aiwt-card-brand {
  font-family: var(--aiwt-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aiwt-accent);
}
.aiwt-card-model {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.aiwt-card-meta {
  font-family: var(--aiwt-mono);
  font-size: 11px;
  color: var(--aiwt-text-dim);
  margin-top: 2px;
}
.aiwt-card-sep { color: var(--aiwt-text-faint); }
.aiwt-card-price-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}
.aiwt-card-price {
  font-weight: 700;
  font-size: 16px;
  color: var(--aiwt-accent);
}
.aiwt-card-trade {
  font-family: var(--aiwt-mono);
  font-size: 11px;
  color: var(--aiwt-text-dim);
  margin-top: 4px;
}

.aiwt-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: var(--aiwt-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid;
  white-space: nowrap;
}
.aiwt-pill-instock {
  color: var(--aiwt-instock);
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
}
.aiwt-pill-supplier {
  color: var(--aiwt-supplier);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.aiwt-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.aiwt-page {
  background: transparent;
  color: var(--aiwt-text-dim);
  border: 1px solid var(--aiwt-card-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--aiwt-mono);
  font-size: 12px;
  cursor: pointer;
}
.aiwt-page:hover { color: var(--aiwt-accent); border-color: var(--aiwt-accent); }
.aiwt-page-current {
  background: linear-gradient(135deg, var(--aiwt-accent-2), var(--aiwt-accent));
  color: white;
  border-color: transparent;
}
.aiwt-page-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
