/* ============================================================
   SEALED EXPLORER — css/sealed-explorer.css
   Bloomberg-style sealed product analytics page
   ============================================================ */

/* ── PULSE BAR (sticky stats) ── */
.se-pulse-bar {
  position: sticky;
  top: 56px; /* below header */
  z-index: 90;
  background: linear-gradient(135deg, #0f1724 0%, #1a2332 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0;
}
.se-pulse-inner {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.se-stat {
  text-align: center;
  min-width: 100px;
}
.se-stat-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.se-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* ── SECTIONS ── */
.se-section {
  margin-bottom: 32px;
}

/* ── EDUCATIONAL DESCRIPTION BOX ── */
.se-category-desc {
  border-left: 3px solid #d97706;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: rgba(217, 119, 6, 0.04);
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── LOADING / ERROR ── */
.se-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.se-error {
  text-align: center;
  padding: 60px 20px;
}
.se-error-icon { font-size: 2.5rem; margin-bottom: 12px; }
.se-error-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.se-error-msg { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }

/* ── HERO GRID (Best Opportunities) ── */
.se-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.se-hero-card {
  position: relative;
  background: var(--bg-card, #0d1117);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.se-hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: #d97706;
}
.se-hero-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-secondary, #0a0d14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.se-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}
.se-hero-img-wrap .se-icon-fallback {
  font-size: 2.5rem;
  opacity: 0.5;
}
.se-grade-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.se-hero-body {
  padding: 10px 12px;
}
.se-hero-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.se-hero-set {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.se-hero-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.se-hero-price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
}
.se-hero-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── SUPPLY PILL ── */
.se-supply-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.se-supply-pill.in-print  { background: rgba(5,150,105,0.12); color: #059669; }
.se-supply-pill.going-oop { background: rgba(217,119,6,0.12); color: #d97706; }
.se-supply-pill.oop       { background: rgba(220,38,38,0.12); color: #dc2626; }
.se-supply-pill.vintage   { background: rgba(107,114,128,0.12); color: #6b7280; }
.se-supply-pill.unknown   { background: rgba(107,114,128,0.08); color: #9ca3af; }

/* ── CHANGE COLORS ── */
.se-positive { color: #059669; }
.se-negative { color: #dc2626; }
.se-neutral-change { color: var(--text-muted); }

/* ── HORIZONTAL SCROLL STRIP (Supply Watch) ── */
.se-hscroll-strip {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.se-supply-card {
  min-width: 220px;
  max-width: 260px;
  flex-shrink: 0;
  background: var(--bg-card, #0d1117);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.se-supply-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #d97706;
}
.se-supply-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-supply-card-set {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.se-supply-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── RIP OR HOLD GRID ── */
.se-rip-hold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.se-rip-card {
  background: var(--bg-card, #0d1117);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.se-rip-left { flex: 1; min-width: 0; }
.se-rip-set {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-rip-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.se-rip-right {
  text-align: center;
  min-width: 70px;
}
.se-shi-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
}
.se-shi-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}
.se-shi-hot .se-shi-value { color: #dc2626; }
.se-shi-hot .se-shi-label { color: #dc2626; }
.se-shi-neutral .se-shi-value { color: #d97706; }
.se-shi-neutral .se-shi-label { color: #d97706; }
.se-shi-cold .se-shi-value { color: #059669; }
.se-shi-cold .se-shi-label { color: #059669; }

/* ── CATEGORY TABS ── */
.se-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.se-tabs::-webkit-scrollbar { display: none; }
.se-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card, #0d1117);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  color: var(--text-secondary);
}
.se-tab:hover {
  border-color: #d97706;
  color: #d97706;
}
.se-tab.active {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

/* ── FILTERS ── */
.se-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.se-search {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  background: var(--bg-card, #0d1117);
  color: var(--text-primary);
  outline: none;
}
.se-search:focus { border-color: #d97706; }
.se-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--bg-card, #0d1117);
  color: var(--text-primary);
  cursor: pointer;
}

/* ── DATA TABLE ── */
.se-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.se-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.se-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  white-space: nowrap;
  user-select: none;
}
.se-sortable { cursor: pointer; }
.se-sortable:hover { color: #d97706; }
.se-sortable.se-sort-active { color: #d97706; }
.se-sortable::after {
  content: ' \25B4\25BE';
  font-size: 0.6rem;
  opacity: 0.4;
}
.se-sortable.se-sort-asc::after { content: ' \25B2'; opacity: 1; }
.se-sortable.se-sort-desc::after { content: ' \25BC'; opacity: 1; }

.se-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.se-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.se-table tbody tr:hover {
  background: rgba(217, 119, 6, 0.04);
}
.se-table .se-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 30px;
  text-align: center;
}
.se-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}
.se-product-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-secondary, #0a0d14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.se-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  box-sizing: border-box;
}
.se-product-thumb .se-icon-sm { font-size: 1.1rem; }
.se-product-info { min-width: 0; }
.se-product-name {
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.se-product-set {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.se-grade-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.85rem;
}
.se-price-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
}
.se-change-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.se-sparkline-cell {
  width: 80px;
  min-width: 60px;
}
.se-no-grade {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
}

/* ── SHOW MORE ── */
.se-show-more-wrap {
  text-align: center;
  margin-top: 12px;
}
.se-show-more-btn {
  padding: 10px 24px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.se-show-more-btn:hover {
  border-color: #d97706;
  color: #d97706;
}
.se-results-meta {
  text-align: center;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── NEW ARRIVALS GRID ── */
.se-new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.se-new-card {
  background: var(--bg-card, #0d1117);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.se-new-card-name {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 4px;
}
.se-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}
.se-new-price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  margin-top: 6px;
  font-size: 0.85rem;
}

/* ── EMPTY STATE ── */
.se-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   WATCHLIST STARS
   ============================================================ */
.se-watchlist-star {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-size: 1rem; cursor: pointer; opacity: 0.3; transition: opacity 0.15s, transform 0.15s;
  color: #d97706; user-select: none;
}
.se-watchlist-star:hover { opacity: 0.7; transform: scale(1.15); }
.se-watchlist-star.active { opacity: 1; }
.se-watchlist-star-table {
  font-size: 0.9rem; cursor: pointer; opacity: 0.3; transition: opacity 0.15s;
  color: #d97706; user-select: none;
}
.se-watchlist-star-table:hover { opacity: 0.7; }
.se-watchlist-star-table.active { opacity: 1; }
.se-star-cell { width: 28px; text-align: center; padding: 0 4px !important; }
th.se-star-th { width: 28px; text-align: center; padding: 0 4px !important; font-size: 0.85rem; color: #d97706; }
.se-hero-card, .se-supply-card, .se-new-card { position: relative; }

/* ============================================================
   WATCHLIST FILTER TOGGLE
   ============================================================ */
.se-watchlist-toggle {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text-secondary); font-size: 0.8rem;
  font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.se-watchlist-toggle:hover { border-color: #d97706; color: #d97706; }
.se-watchlist-toggle.active {
  background: rgba(217,119,6,0.1); border-color: #d97706; color: #d97706;
}

/* ============================================================
   NAV BADGE
   ============================================================ */
.se-nav-badge {
  position: absolute; top: -4px; right: -10px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #dc2626; color: #fff;
  font-size: 0.6rem; font-weight: 700; line-height: 16px; text-align: center;
  pointer-events: none;
}

/* ============================================================
   ALERT BANNER
   ============================================================ */
.se-alert-banner {
  margin: 16px 0; padding: 12px 16px;
  background: rgba(217,119,6,0.06); border: 1px solid rgba(217,119,6,0.2);
  border-left: 4px solid #d97706; border-radius: 10px;
}
.se-alert-banner-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 0.85rem; font-weight: 700; color: #d97706;
}
.se-alert-banner-icon { font-size: 1rem; }
.se-alert-list { display: flex; flex-direction: column; gap: 6px; }
.se-alert-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--card-bg); border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.se-alert-item:hover { border-color: #d97706; }
.se-alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.se-alert-body {
  flex: 1; min-width: 0; cursor: pointer;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
}
.se-alert-product { font-weight: 700; font-size: 0.82rem; }
.se-alert-type {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: #d97706;
}
.se-alert-msg { font-size: 0.78rem; color: var(--text-muted); }
.se-alert-dismiss {
  flex-shrink: 0; width: 24px; height: 24px; border: none; background: none;
  color: var(--text-muted); font-size: 1.1rem; cursor: pointer; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.se-alert-dismiss:hover { background: rgba(220,38,38,0.1); color: #dc2626; }
.se-alert-overflow {
  text-align: center; font-size: 0.78rem; color: var(--text-muted);
  padding: 4px 0; font-style: italic;
}

/* ============================================================
   ALERT CONFIG MODAL
   ============================================================ */
.se-acm-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.se-acm-modal {
  position: relative; width: 100%; max-width: 480px; max-height: 85vh;
  overflow-y: auto; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 24px;
}
.se-acm-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border: none; background: none;
  color: var(--text-muted); font-size: 1.2rem; cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.se-acm-close:hover { background: var(--hover-bg); }

/* Header */
.se-acm-header {
  display: flex; gap: 14px; align-items: center; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.se-acm-img-wrap { width: 60px; height: 60px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--hover-bg); display: flex; align-items: center; justify-content: center; }
.se-acm-img { width: 100%; height: 100%; object-fit: contain; }
.se-acm-icon-fallback { font-size: 1.8rem; }
.se-acm-info { flex: 1; min-width: 0; }
.se-acm-name { font-weight: 700; font-size: 0.95rem; line-height: 1.3; margin-bottom: 2px; }
.se-acm-set { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.se-acm-price-row { display: flex; align-items: center; gap: 8px; }
.se-acm-price { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1rem; }

/* Sections */
.se-acm-section { margin-bottom: 18px; }
.se-acm-section-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 10px;
}
.se-acm-divider { height: 1px; background: var(--border); margin: 12px 0; }

/* Toggle rows */
.se-acm-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; font-size: 0.85rem; cursor: pointer; user-select: none;
}
.se-acm-toggle-row span:first-child { flex: 1; }
.se-acm-check { display: none; }
.se-acm-switch {
  position: relative; width: 36px; height: 20px; border-radius: 10px;
  background: #374151; transition: background 0.2s; flex-shrink: 0;
}
.se-acm-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.2s;
}
.se-acm-check:checked + .se-acm-switch { background: #059669; }
.se-acm-check:checked + .se-acm-switch::after { transform: translateX(16px); }

/* Price target */
.se-acm-pt-label { font-size: 0.85rem; margin-bottom: 8px; }
.se-acm-pt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.se-acm-radio { font-size: 0.82rem; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.se-acm-radio input { margin: 0; }
.se-acm-pt-input-wrap {
  display: flex; align-items: center; gap: 2px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 600;
}
.se-acm-pt-input {
  width: 80px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}
.se-acm-pt-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* History */
.se-acm-history { max-height: 180px; overflow-y: auto; }
.se-acm-history-item {
  display: flex; align-items: baseline; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 0.78rem;
}
.se-acm-history-item:last-child { border-bottom: none; }
.se-acm-history-icon { font-size: 0.85rem; flex-shrink: 0; }
.se-acm-history-date { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; flex-shrink: 0; }
.se-acm-history-msg { flex: 1; }
.se-acm-empty { font-size: 0.78rem; color: var(--text-muted); font-style: italic; padding: 8px 0; }

/* Footer */
.se-acm-footer { padding-top: 14px; border-top: 1px solid var(--border); text-align: center; }
.se-acm-remove {
  padding: 8px 20px; border-radius: 8px; border: 1px solid #dc2626;
  background: rgba(220,38,38,0.08); color: #dc2626; font-size: 0.82rem;
  font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.se-acm-remove:hover { background: #dc2626; color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .se-hero-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .se-pulse-bar { top: 48px; padding: 8px 0; }
  .se-stat-value { font-size: 1rem; }
  .se-hero-grid { grid-template-columns: repeat(2, 1fr); }
  .se-hide-mobile { display: none !important; }
  .se-product-name { max-width: 140px; }
  .se-filters { flex-direction: column; }
  .se-search { min-width: unset; }
  .se-rip-hold-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .se-pulse-inner { gap: 8px; }
  .se-stat { min-width: 70px; }
  .se-stat-value { font-size: 0.9rem; }
  .se-hero-grid { grid-template-columns: 1fr; }
  .se-rip-hold-grid { grid-template-columns: 1fr; }
  .se-product-name { max-width: 110px; }
  .se-new-grid { grid-template-columns: 1fr 1fr; }
  .se-alert-body { flex-direction: column; gap: 2px; }
  .se-acm-modal { padding: 16px; }
  .se-acm-pt-row { flex-direction: column; align-items: flex-start; }
}
