/* Wishlist Budget Alignment Matrix Styles */
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fafafa;
  margin: 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 10;
}
header h1 {
  font-size: 1.5rem;
  margin: 0;
  color: #1a1a1a;
}
nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}
nav a {
  color: #666;
  text-decoration: none;
}
nav a:hover { color: #0077cc; }
nav a.current { color: #0077cc; font-weight: 500; }

/* Intro Section */
.intro {
  padding: 2rem 0;
  text-align: center;
}
.intro h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.intro p { max-width: 600px; margin: 0 auto 1rem; }

/* Controls Section */
.controls {
  background: #fff;
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.preset-buttons { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.add-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.add-controls input {
  flex: 1; min-width: 200px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.add-controls button { padding: 0.5rem 1rem; }

/* Matrix Section */
.matrix-section {
  margin: 2rem 0;
}
.matrix-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
#wishlistMatrix {
  border-collapse: collapse;
  min-width: 600px;
}
#wishlistMatrix th, #wishlistMatrix td {
  border: 1px solid #e5e5e5;
  padding: 0.75rem;
  text-align: left;
  min-width: 120px;
}
#wishlistMatrix th {
  background: #f5f5f5;
  font-weight: 600;
  position: sticky;
  top: 60px;
}
#wishlistMatrix th.category-header {
  background: #e8f4fd;
}
#wishlistMatrix td {
  vertical-align: top;
}

/* Colors for budget status */
.affordable { background: #d4edda; }
.over { background: #fff3cd; }
.free { background: #cce5ff; }
.empty { background: #f8f9fa; }
.color-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.affordable .color-box { background: #28a745; }
.over .color-box { background: #ffc107; }
.free .color-box { background: #007bff; }
.empty .color-box { background: #6c757d; }

/* Legend */
.legend {
  background: #fff;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Free Alternatives Section */
.alternatives-section {
  background: #fff;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.alternatives-section h2 { font-size: 1.25rem; margin-top: 0; }
#alternativesList {
  margin: 1rem 0;
}
.alternative-item {
  padding: 0.75rem;
  background: #f8f9ff;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  border-left: 3px solid #007bff;
}
.alternative-item p { margin: 0.25rem 0 0; }

/* Results Section */n.results-section {
  background: #fff;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05;
}
#summaryOutput {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
}
.results-section h2 { font-size: 1.25rem; margin-top: 0; }

/* Support Content Section */
.support-content {
  padding: 2rem 0;
}
.support-content h2, .support-content h3 { color: #1a1a1a; }
.support-content ul { padding-left: 1.5rem; }
.support-content li { margin-bottom: 0.5rem; }

/* Buttons */
button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  transition: background 0.2s, opacity 0.2s;
}
button.primary { background: #0077cc; color: #fff; padding: 0.75rem 1.5rem; }
button.primary:hover { background: #005fa3; }
button.secondary { background: #f0f0f0; color: #333; padding: 0.5rem 1rem; }
button.secondary:hover { background: #e0e0e0; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Empty State */
.empty-state {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Footer */
footer {
  background: #fff;
  padding: 1rem;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 0.5rem; }
  header h1 { font-size: 1.25rem; }
  nav { gap: 1rem; font-size: 0.8rem; }
  .controls { flex-direction: column; gap: 1rem; }
  .add-controls { flex-direction: column; }
  .add-controls input { min-width: auto; width: 100%; }
  #wishlistMatrix { font-size: 0.85rem; }
  #wishlistMatrix th, #wishlistMatrix td { padding: 0.5rem; }
}
@media (max-width: 480px) {
  .preset-buttons { flex-direction: column; }
  .legend { font-size: 0.85rem; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
