/* ============================================================
   EQUIPMENT.CSS — Equipment & Gear styling
   Inherits: theme.css, layout.css, nav.css, components.css
   ============================================================ */

.tool-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* ── BACKGROUND ──────────────────────────────────────────────── */
body {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(60, 50, 10, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(10, 40, 30, 0.14) 0%, transparent 60%);
}

/* ── CONTROLS ────────────────────────────────────────────────── */
.eq-controls {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 18px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eq-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.eq-filter-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.eq-search {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}

.eq-subfilter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* ── PILLS ───────────────────────────────────────────────────── */
.eq-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.eq-pill {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  border-radius: 3px;
  padding: 3px 9px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-muted);
  transition: all 0.15s;
  user-select: none;
}

.eq-pill:hover {
  border-color: var(--text-dim);
  color: var(--text-light);
}

.eq-pill.active {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ── RESULTS BAR ─────────────────────────────────────────────── */
#results-bar {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--results-bg);
  border-radius: 4px;
  padding: 6px 12px;
  margin-bottom: 14px;
}

/* ── CARD GRID (compact — mundane items are small) ───────────── */
#card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
}

/* ── EQUIPMENT CARD ──────────────────────────────────────────── */
.eq-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  transition: transform 0.13s ease, box-shadow 0.13s ease;
  color: #222;
  font-family: 'EB Garamond', Georgia, serif;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
}

.eq-card:hover,
.eq-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.55);
  outline: none;
}

.eq-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(201,168,76,0.55), 0 8px 26px rgba(0,0,0,0.5);
}

.eq-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px 6px;
}

.eq-card-name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  overflow-wrap: break-word;
  min-width: 0;
}

.eq-cost-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  background: rgba(0,0,0,0.28);
  color: rgba(255,255,255,0.92);
  border-radius: 3px;
  padding: 2px 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.eq-card-body {
  padding: 6px 9px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.eq-card-stat {
  font-size: 0.74rem;
  color: #333;
  line-height: 1.35;
}

.eq-card-sub {
  font-size: 0.66rem;
  color: #777;
  font-style: italic;
  margin-top: auto;
}

/* ── MODAL (equipment-specific) ──────────────────────────────── */
#modal-box { max-width: 540px; }

.eq-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
}

.eq-stat-row:last-of-type { border-bottom: none; }

.eq-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  padding-top: 2px;
  flex-shrink: 0;
}

.eq-stat-value {
  color: #222;
  text-align: right;
}

.eq-desc {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
  margin-top: 12px;
}

.eq-prop {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.45;
  padding: 5px 0;
  border-bottom: 1px solid #f2f0ea;
}

.eq-prop:last-child { border-bottom: none; }

.eq-prop-name {
  font-weight: 600;
  font-style: italic;
  color: #111;
}

.eq-contents {
  list-style: none;
  padding: 0;
  margin: 0;
}

.eq-contents li {
  font-size: 0.88rem;
  color: #333;
  padding: 3px 0 3px 16px;
  position: relative;
  border-bottom: 1px solid #f2f0ea;
}

.eq-contents li:last-child { border-bottom: none; }

.eq-contents li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7a5a2a;
}

/* Modal notes on white box — keep readable regardless of theme */
#modal-box .modal-notes {
  background: #f9f7f2;
  color: #555;
}

#modal-box .modal-section-label { color: #7a5a2a; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tool-container { padding: 16px; }
  #card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
  .eq-subfilter { padding-left: 0; border-left: none; }
}

@media (max-width: 420px) {
  #card-grid { grid-template-columns: 1fr 1fr; }
}
