/* =========================
   Home Theatre Tools CSS
========================= */

/* -------------------------
   Body Themes
------------------------- */
body.htc-dark {
  background: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
}

body.htc-light {
  background: #fff;
  color: #333;
  font-family: 'Segoe UI', sans-serif;
}

/* -------------------------
   Theme Toggle Button
------------------------- */
#htc-theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 999;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 5px;
  background: #007acc;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

#htc-theme-toggle:hover {
  background: #005f99;
}

/* -------------------------
   Deep Dive Guide
------------------------- */
#htc-guide {
  margin-bottom: 2rem;
}

/* Tabs Container */
.htc-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ddd;
}

/* Tabs */
.htc-tab {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 5px 5px 0 0;
  background: #f5f5f5;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.htc-tab.active {
  background: #007acc;
  color: #fff;
  border-color: #007acc;
  font-weight: bold;
}

/* Tab Panels */
.htc-tab-content {
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 5px 5px;
  background: #fafafa;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Tab Panel Content */
.htc-tab-panel ul {
  margin-left: 1.2rem;
  margin-bottom: 0;
}

.htc-tab-panel li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* -------------------------
   Calculator Section
------------------------- */
.htc-section {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: #fff;
}

body.htc-dark .htc-section {
  background: #1e1e1e;
  border-color: #333;
  color: #e0e0e0;
}

/* Highlight active category */
.htc-section.highlight {
  border: 2px solid #007acc !important;
  background: #e6f0ff;
}

body.htc-dark .htc-section.highlight {
  background: #003366;
}

/* Label & Optimized Badge */
.htc-section label {
  font-weight: bold;
}

.htc-section label span.optimized-badge {
  background: #007acc;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  margin-left: 0.5rem;
  border-radius: 3px;
}

/* Total Cost Section */
.htc-total {
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: bold;
}

.htc-total-cost {
  margin-top: 0.2rem;
  font-size: 1.4rem;
}

/* -------------------------
   Inputs and Selects
------------------------- */
.htc-section select,
.htc-section input[type=number] {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

body.htc-dark .htc-section select,
body.htc-dark .htc-section input[type=number] {
  background: #2a2a2a;
  border-color: #555;
  color: #e0e0e0;
}

/* -------------------------
   Action Buttons (Share, Save, Print)
------------------------- */
.htc-section button {
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  background: #007acc;
  color: #fff;
  transition: background 0.2s;
}

.htc-section button:hover {
  background: #005f99;
}

/* -------------------------
   Responsive
------------------------- */
@media (max-width: 768px) {
  .htc-tabs {
    gap: 0.25rem;
    padding-bottom: 0.25rem;
  }
  .htc-tab {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  .htc-tab-content {
    padding: 0.8rem;
  }
  .htc-section select,
  .htc-section input[type=number] {
    font-size: 0.9rem;
  }
}
