/* ========== PARTS PAGE ========== */

.parts-section {
  background-color: var(--color-bg-primary);
  padding-block: 40px 80px;
}

.parts-container {
  max-width: 1400px;
}

.parts-title {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 32px;
  color: var(--color-text-primary);
}

.parts-search-wrap {
  margin-bottom: 24px;
}

.parts-search-input {
  width: 100%;
  max-width: 600px;
  padding-inline: 16px;
  padding-block: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--color-text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-base),
    background-color var(--transition-base);
}

.parts-search-input::placeholder {
  color: var(--color-text-muted);
}

.parts-search-input:focus-visible {
  border-color: rgba(255, 255, 255, 0.32);
  background-color: rgba(255, 255, 255, 0.04);
}

.parts-info {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.parts-count {
  display: inline-block;
}

.parts-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.parts-table thead {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.parts-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.parts-table th:first-child {
  padding-left: 0;
}

.parts-table th:last-child {
  padding-right: 0;
  text-align: right;
}

.parts-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color var(--transition-base);
}

.parts-table tbody tr.parts-row {
  cursor: pointer;
}

.parts-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

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

.parts-table td {
  padding: 16px;
  color: var(--color-text-primary);
  vertical-align: top;
}

.parts-table td:first-child {
  padding-left: 0;
  color: var(--color-text-secondary);
  font-weight: 500;
  min-width: 120px;
}

.parts-table td:nth-child(2) {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  min-width: 100px;
}

.parts-table td:nth-child(3) {
  min-width: 300px;
  line-height: 1.5;
}

.parts-table td:last-child {
  padding-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
  min-width: 100px;
}

.parts-loading,
.parts-empty {
  text-align: center;
  padding: 48px 16px !important;
  color: var(--color-text-muted);
  font-size: 14px;
}

.parts-empty code {
  font-family: "Courier New", monospace;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ========== REQUEST POPUP ========== */

.request-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.request-popup[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.request-popup-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.request-popup-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 24px;
  background-color: #111111;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 32px;
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.request-popup[aria-hidden="false"] .request-popup-content {
  transform: translateY(0);
}

.request-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-base), opacity var(--transition-base);
  z-index: 2;
}

.request-popup-close:hover {
  color: var(--color-text-primary);
  opacity: 1;
}

.request-popup-close:active {
  opacity: 0.7;
}

.request-popup-title {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

.request-popup-form {
  margin-top: 0;
}

.request-popup-actions {
  margin-top: 24px;
}

.request-popup-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .request-popup-content {
    margin: 16px;
    padding: 24px;
  }

  .request-popup-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .request-popup-close {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .parts-section {
    padding-block: 32px 64px;
  }

  .parts-title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .parts-search-input {
    font-size: 16px;
  }

  .parts-table {
    font-size: 13px;
  }

  .parts-table th,
  .parts-table td {
    padding: 12px 8px;
  }

  .parts-table th:first-child,
  .parts-table td:first-child {
    padding-left: 0;
  }

  .parts-table th:last-child,
  .parts-table td:last-child {
    padding-right: 0;
  }

  .parts-table td:nth-child(3) {
    min-width: 200px;
  }
}

