/* diagnostics.css */

/* Hide hero overlay */
.hero-overlay {
  display: none;
}

/* Page layout */
.diagnostics-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
}

/* ========== Wiremap Layout ========== */

/* Top explanation box */
.diag-explainer {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Middle two-column section */
.diag-main {
  display: flex;
  gap: 2rem;
}

.diag-column {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

/* Bottom full-width parts list */
.diag-parts-list {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Headings */
.diagnostics-page h2,
.diagnostics-page h3 {
  color: #002868; /* American Flag Blue */
  margin-bottom: 1rem;
}

/* --- Symptom dropdown + filter --- */
.sign-dropdown,
.sign-filter {
  width: 100%;
  padding: 0.3rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.no-matches {
  color: #c00;
  font-style: italic;
  margin-top: 0.5rem;
}

.no-matches.hidden {
  display: none;
}

/* --- Sign buttons --- */
#signs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sign-button {
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s, color 0.3s;
}

.sign-button:hover {
  background: #ddd;
}

.sign-button.active {
  background: #002868;
  color: #fff;
  border-color: #002868;
}

/* --- Parts container --- */
#parts-container,
#category-parts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.part-button {
  background: rgba(191, 10, 48, 0.9); /* Flag Red */
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.3s, transform 0.2s;
}

.part-button:hover {
  background: rgba(191, 10, 48, 1);
  transform: translateY(-2px);
}

/* Empty state message */
.empty-message {
  width: 100%;
  font-style: italic;
  color: #666;
  margin-top: 0.5rem;
}

/* --- Modal --- */
#part-modal.hidden {
  display: none;
}

#part-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

#modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.2s;
}

#modal-close:hover {
  color: #c00;
}

/* Modal typography */
#modal-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: #002868;
}

#modal-short {
  font-weight: bold;
  margin-bottom: 0.75rem;
}

#modal-common ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
}

#modal-long {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* --- Icon Grid (Visual Search) --- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-icon {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-icon img {
  max-width: 60px;
  margin-bottom: 0.5rem;
}

.category-icon:hover {
  background: #ddd;
  transform: scale(1.05);
}

.category-icon.active {
  background: #002868;
  color: #fff;
  border-color: #002868;
}

#selected-services {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

#selected-services h3 {
  margin-bottom: 0.75rem;
  color: #002868;
}

#selected-services ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

#selected-services .svc-btn {
  display: inline-block;
  width: auto;
  text-align: center;
}

/* --- Mobile Tweaks --- */
@media (max-width: 768px) {
  .diagnostics-page {
    padding: 1rem;
    gap: 1.5rem;
  }

  .diag-main {
    flex-direction: column;
  }

  .sign-button,
  .part-button {
    flex: 1 1 100%;
    text-align: center;
  }

  .modal-content {
    width: 95%;
    padding: 1rem;
  }

  #modal-title {
    font-size: 1.2rem;
  }

  .icon-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
  }

  .category-icon img {
    max-width: 50px;
  }
}
