/* ============================================================
   MERCY RECORDS — STUDIO EQUIPMENT DISCOVERY EXPERIENCE
   Location: studio/equipment/equipment.css
   Responsive • WCAG 2.2 AA Compliant • Editorial Brutalist Styling
   ============================================================ */

/* ─── Search & Filter Controls ─── */
.equipment-controls {
  padding: 30px var(--pad-x) 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.equipment-controls-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 100%;
  padding: 16px 44px 16px 20px;
  background: #111;
  border: 1px solid var(--line);
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  border-radius: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.search-input::placeholder {
  color: var(--muted);
  font-size: 14px;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  display: none;
}

.search-clear-btn:hover {
  color: #fff;
}

/* Category Filter Pills */
.filter-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #141414;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  color: #fff;
  border-color: #444;
  background: #1a1a1a;
}

.filter-pill.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
}

.filter-count {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.filter-pill.active .filter-count {
  background: rgba(0, 0, 0, 0.2);
  color: #000;
}

/* Results Summary Bar */
.results-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.reset-filters-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 0;
}

.reset-filters-btn:hover {
  color: #fff;
}

/* ─── Equipment Cards Grid ─── */
.equipment-section {
  padding: 60px var(--pad-x) 100px;
  background: var(--bg);
}

.equipment-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}

.equipment-card {
  background: #111;
  border: 1px solid var(--line);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.equipment-card:hover {
  transform: translateY(-3px);
  border-color: #383838;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.equipment-card.is-pending {
  border-style: dashed;
  background: #0d0d0d;
}

.card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.card-category-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.card-status-badge.verified {
  color: #70d670;
  border-color: rgba(112, 214, 112, 0.25);
  background: rgba(112, 214, 112, 0.08);
}

.card-status-badge.pending {
  color: #e0a030;
  border-color: rgba(224, 160, 48, 0.25);
  background: rgba(224, 160, 48, 0.08);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.card-manufacturer {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.card-model-title {
  font-family: var(--display, 'Cabinet Grotesk', sans-serif);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.card-role-tag {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 16px;
  line-height: 1.4;
  font-weight: 500;
}

.card-summary {
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
  margin-bottom: 24px;
}

/* Spec snippet pills */
.card-spec-snippets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
}

.spec-snippet-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.spec-snippet-label {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

.spec-snippet-val {
  color: #ddd;
  text-align: right;
  font-weight: 500;
}

.card-action-btn {
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid var(--line);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-action-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.equipment-card.is-pending .card-action-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* Empty search state */
.empty-results-box {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: #111;
  border: 1px dashed var(--line);
}

.empty-results-title {
  font-size: 20px;
  font-family: var(--display, 'Cabinet Grotesk', sans-serif);
  color: #fff;
  margin-bottom: 12px;
}

/* ─── Detail Modal / Drawer ─── */
.equipment-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.equipment-modal-backdrop.active {
  display: flex;
}

.equipment-modal {
  background: #111;
  border: 1px solid #333;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  padding: 40px;
  box-sizing: border-box;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.modal-close-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.modal-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-right: 48px;
}

.modal-category-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modal-title {
  font-family: var(--display, 'Cabinet Grotesk', sans-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 10px;
}

.modal-role {
  font-size: 15px;
  color: var(--gold);
  line-height: 1.4;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.modal-block-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.modal-desc-text {
  font-size: 15px;
  line-height: 1.7;
  color: #ccc;
}

/* Specifications Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.specs-table tr {
  border-bottom: 1px solid var(--line);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.specs-table td:first-child {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  width: 38%;
  background: #141414;
  border-right: 1px solid var(--line);
}

.specs-table td:last-child {
  color: #fff;
  font-weight: 500;
}

/* Signal Chain Visual Box */
.signal-chain-box {
  background: #161616;
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: #ddd;
  letter-spacing: 0.05em;
}

.modal-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .equipment-controls {
    padding: 24px var(--pad-x) 30px;
  }
  
  .equipment-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .equipment-modal {
    padding: 24px 20px;
  }
  
  .specs-table td:first-child {
    width: 45%;
  }
}

@media (max-width: 480px) {
  .card-top-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .modal-header {
    padding-right: 0;
    margin-top: 20px;
  }
  
  .specs-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
}
