/* Steps Container Styles */
.calculator-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 30px;
  margin-bottom: 30px;
}

.steps-wrapper {
  display: flex;
  flex-direction: column;
}

/* Steps Navigation Styles */
.steps-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0;
  position: relative;
}

/* Background line (gray) */
.steps-nav::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #e0e0e0;
  z-index: 1;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 0 10px;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f5f5f5;
  border: 2px solid #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: #999;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 3; /* Ensure circles are above the lines */
}

.step-title {
  color: #999;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.step-item.active .step-circle {
  background-color: #3498db;
  border-color: #3498db;
  color: white;
  box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
}

.step-item.active .step-title {
  color: #3498db;
  font-weight: 600;
}

.step-item.completed .step-circle {
  background-color: #3498db;
  border-color: #3498db;
  color: white;
}

.step-item.completed .step-title {
  color: #3498db;
}

/* Progress line container for completed steps */
.steps-nav .progress-line {
  position: absolute;
  top: 25px;
  left: 0;
  height: 2px;
  background-color: #8a7bff;
  z-index: 2;
  transition: width 0.3s ease;
}

/* Step Content Styles */
.steps-content {
  position: relative;
  min-height: 400px;
}

.step-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.step-content.active {
  display: block;
}

.step-content h3 {
  color: #2c3e50;
  font-size: 24px;
  margin-bottom: 15px;
}

.step-content p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
  max-width: 80%;
}

/* Button Styles */
.step-action {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
}

button {
  padding: 12px 25px;
  border-radius: 5px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.next-btn {
  background-color: #3498db;
  color: #fff;
}

.next-btn:hover {
  background-color: #2980b9;
}

.prev-btn {
  background-color: #e0e0e0;
  color: #555;
}

.prev-btn:hover {
  background-color: #d0d0d0;
}

.calculate-btn {
  background-color: #27ae60;
  color: #fff;
}

.calculate-btn:hover {
  background-color: #219955;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Map Styles */
#map {
  height: 400px;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#map:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-control-zoom {
  position: absolute;
  left: 12px;
  top: 300px;
  z-index: 1000;
}

.search-container {
  position: relative;
  margin-bottom: 15px;
  width: 100%;
}

#search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#search-input:focus {
  border-color: #3498db;
  box-shadow: 0 2px 15px rgba(52, 152, 219, 0.15);
  outline: none;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

#searchResults {
  position: absolute;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  margin-top: 5px;
  border: 1px solid #eee;
}

.search-item {
  padding: 12px 15px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-item:hover {
  background-color: #f8f9fa;
}

.search-item:last-child {
  border-bottom: none;
}

#map-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2c3e50;
}

input, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

/* Results Card Styles */
.result-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.result-card > div {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid #3498db;
}

.result-card > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.result-card > div:nth-child(2) {
  border-top-color: #f1c40f;
}

.result-card > div:nth-child(3) {
  border-top-color: #27ae60;
}

.result-card > div:nth-child(4) {
  border-top-color: #e74c3c;
}

.result-card h3 {
  color: #2c3e50;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.result-card p {
  color: #2c3e50;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px 0;
  max-width: 100%;
}

.result-card small {
  display: block;
  color: #7f8c8d;
  font-size: 14px;
}

/* Tooltip container styles */
.tooltip-container {
  position: relative;
  cursor: help;
}

.tooltip-container h3 .fa-info-circle{
  color: #f1c40f;
}

/* Enhanced Monthly Savings Display */
.savings-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.savings-disclaimer {
  grid-column: 1 / -1;
  background-color: #f8f9fa;
  border-left: 4px solid #f1c40f;
  padding: 12px 15px;
  font-size: 14px;
  color: #666;
  margin-top: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0 4px 4px 0;
}

.savings-disclaimer i {
  color: #f1c40f;
  font-size: 18px;
}

.primary-currency {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.country-flag {
  display: inline-block;
  font-size: 24px;
  margin-right: 5px;
}

.converted-currency {
  font-size: 14px;
  color: #7f8c8d;
  font-style: italic;
  font-weight: 500;
}

/* results-section */
.results-section {
  background-color: white;
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.results-section h4 {
  color: #2c3e50;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Explanation section */
.explanation-section {
  background-color: #f8f9fa;
}

.explanation-items {
  display: grid;
  gap: 20px;
}

.explanation-item {
  padding: 15px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.explanation-item h5 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
}

.explanation-item p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
}

/* chart container */
.chart-container {
  width: 100%;
  height: 350px;
}

/* tech-detail grid */
.tech-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.tech-detail-item {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease;
}

.tech-detail-item:hover {
  background-color: #ebf5fb;
}

.detail-label {
  color: #7f8c8d;
  font-size: 14px;
  margin-bottom: 5px;
}

.detail-value {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
}

/* suficiency meter */
.sufficiency-container {
  margin: 25px 0;
}

.sufficiency-meter {
  width: 100%;
  height: 40px;
  background-color: #ecf0f1;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 5px;
}

.sufficiency-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #27ae60);
  border-radius: 20px;
  transition: width 1s ease-in-out;
}

.sufficiency-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.sufficiency-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #7f8c8d;
  font-size: 12px;
}

.sufficiency-description {
  color: #2c3e50;
  font-size: 16px;
  margin-top: 15px;
}

.month-selector-container {
  margin-bottom: 15px;
  text-align: center;
}

.month-selector-container label {
  margin-right: 10px;
  font-weight: bold;
}

#month-selector {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #f8f8f8;
  font-size: 14px;
  cursor: pointer;
}

.unified-chart-container {
  height: 350px;
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  background-color: #f9f9f9;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.timezone-info {
  text-align: right;
  color: #95a5a6;
  font-size: 14px;
  margin-top: 10px;
}

.results-section .subtitle {
  color: #7f8c8d;
  font-size: 16px;
  margin-top: -10px;
  margin-bottom: 20px;
}

.hourly-data-tooltip {
  position: absolute;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: opacity 0.2s;
}

.results-actions {
  display: flex;
  gap: 10px;
  margin: 30px 0;
  justify-content: center;
}

.action-btn {
  background-color: #3498db;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn:hover {
  background-color: #2980b9;
}

#export-pdf {
  background-color: #e74c3c;
}

#export-pdf:hover {
  background-color: #c0392b;
}

.pdf-generating .spinner {
  border-top-color: #e74c3c;
}

/* Satellite Toggle Button */
#satellite-toggle-container button {
  padding: 8px 15px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

#satellite-toggle-container button:hover {
  background-color: #2980b9;
}

/* Loading Spinner */
.loading-spinner {
  padding: 15px;
  text-align: center;
  color: #666;
}

.no-results {
  padding: 15px;
  text-align: center;
  color: #777;
}

/* System Type Grid Styles */
.system-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.system-type-card {
  background-color: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.system-type-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.system-type-card.selected {
  border-color: #3498db;
  background-color: #ebf5fb;
}

.system-icon {
  font-size: 36px;
  color: #3498db;
  margin-bottom: 15px;
}

.system-type-card h4 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 18px;
}

.system-type-card p {
  color: #777;
  font-size: 14px;
  max-width: 100%;
}

/* Enhanced Panel Visual Styles with Mounting Stand */
.panel-settings-visual {
  display: flex;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.panel-visualization {
  flex: 1;
  min-width: 300px;
  height: 300px;
  position: relative;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  perspective: 1200px;
}

.panel-model {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 180px;
  height: 120px;
  transform-origin: bottom center;
  transform: translate(-50%, -50%) rotateX(0deg) rotateZ(0deg);
  transition: transform 0.3s ease;
  z-index: 5;
}

/* Panel mounting stand */
.panel-column {
  position: absolute;
  bottom: 130px;
  left: 50%;
  width: 20px;
  height: 40px;
  background-color: #7f8c8d;
  border-radius: 3px;
  transform: translateX(-50%);
  z-index: 3;
  transform-origin: bottom center;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Panel base/ground */
.panel-base {
  position: absolute;
  bottom: 110px;
  left: 50%;
  width: 100px;
  height: 60px;
  background-color: #34495e;
  border-radius: 3px;
  transform: translateX(-50%);
  z-index: 2;
}

.panel-shadow {
  position: absolute;
  bottom: 85px; /* Position just above the column */
  left: 50%;
  width: 160px;
  height: 5px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transform: translateX(-50%) rotateX(60deg);
  filter: blur(5px);
  z-index: 1;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.panel-surface {
  width: 100%;
  height: 100%;
  background: #2c3e50;
  border: 2px solid #34495e;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform-origin: bottom center;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  gap: 2px;
  padding: 3px;
  background-color: #34495e;
}

.panel-cell {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.panel-cell::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
}

/* Improved axis indicators */
.panel-axis {
  display: none;
}

.x-axis {
  width: 80%;
  height: 2px;
  bottom: 20%;
  left: 10%;
}

.y-axis {
  width: 2px;
  height: 80%;
  top: 10%;
  left: 30%;
}

.axis-label {
 display: none;
}

.x-axis .axis-label {
  bottom: 5px;
  right: 0;
}

.y-axis .axis-label {
  transform: rotate(-90deg);
  top: 0;
  left: -30px;
}

/* Tilt angle indicator */
.tilt-indicator {
  position: absolute;
  right: 15px;
  bottom: 2%;
  width: 50px;
  height: 100px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.3);
  padding: 5px;
  border-radius: 5px;
}

.tilt-arc {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(44, 62, 80, 0.5);
  border-left: none;
  border-bottom: none;
  border-radius: 0 100% 0 0;
  position: relative;
}

.tilt-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: #e74c3c;
  transform-origin: left center;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.tilt-value {
  margin-top: 5px;
  font-weight: bold;
  color: #2c3e50;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
}

.sun-indicator {
  position: absolute;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #f1c40f 30%, transparent 70%);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.8);
  z-index: 10;
  pointer-events: none;
  left: 85% !important;
  top: 10% !important;
}

/* Improved compass indicator */
.compass-indicator {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.compass-n, .compass-e, .compass-s, .compass-w {
  position: absolute;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background-color: rgba(44, 62, 80, 0.7);
  padding: 3px 6px;
  border-radius: 50%;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}

.compass-n {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-e {
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
}

.compass-s {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-w {
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
}

.panel-controls {
  flex: 1;
  min-width: 300px;
}

.angle-slider {
  margin: 20px 10px;
  height: 10px;
}

/* Reset Button Styles */
#reset-panel-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  background-color: #f1c40f;
  color: #333;
  width: 100%;
}

#reset-panel-settings:hover {
  background-color: #f39c12;
}

/* Energy Usage and Appliance Styles */
.energy-usage-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.appliance-calculator {
  margin-top: 30px;
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #3498db;
  color: #fff;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 20px;
}

.toggle-btn:hover {
  background-color: #2980b9;
}

.toggle-btn i {
  font-size: 18px;
}

.appliance-section {
  margin-top: 20px;
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.appliance-section h4 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 18px;
}

.recommendation-note {
  font-size: 14px;
  color: #27ae60;
  font-weight: normal;
  margin-left: 10px;
}

.appliance-filter-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-btn {
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  background-color: #e0e0e0;
}

.category-btn.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}

.appliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.appliance-item {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.appliance-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.appliance-item.selected {
  border-color: #3498db;
  background-color: #ebf5fb;
}

.appliance-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  object-fit: contain;
}

.appliance-label {
  font-size: 12px;
  color: #555;
  line-height: 1.3;
}

.appliance-button {
  background-color: #3498db;
  color: #fff;
}

.selected-appliances {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

#selected-appliances-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.selected-appliance-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: white;
  border-radius: 5px;
  margin-bottom: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.selected-appliance-name {
  font-weight: 500;
  flex: 1;
  min-width: 140px;
}

.selected-appliance-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 2;
}

.add-custom-appliance-section {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.custom-appliance-form {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.custom-appliance-name-edit {
  padding: 0;
  border: none;
  background-color: transparent;
  font-weight: 500;
  color: #2c3e50;
  flex: 1;
}

.custom-appliance-name-edit:focus {
  border-bottom: 1px solid #3498db;
  outline: none;
}

.appliance-quantity {
  width: 60px;
  text-align: center;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.appliance-hours {
  width: 60px;
  text-align: center;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.appliance-wattage {
  width: 80px;
  text-align: center;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.selected-appliance-usage {
  color: #3498db;
  flex: 0.5;
  text-align: right;
  min-width: 80px;
}

.system-size-container {
  margin-top: 30px;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.remove-appliance {
  color: #e74c3c;
  cursor: pointer;
  padding: 5px;
}

.usage-summary {
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-weight: 600;
  color: #2c3e50;
}

.appliance-item.hidden {
  display: none;
}

/* Loading Overlay Styles */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-container {
  text-align: center;
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

#loading-message {
  color: #333;
  font-size: 18px;
  margin: 0;
}

.home-btn{
  background-color: #3498db;
  color: white;
}

.home-btn:hover{
  background-color: #2980b9;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Media Queries for Advanced Calculator */

/* Medium screens (tablets) */
@media (max-width: 1024px) {
  .calculator-container {
    padding: 20px;
  }
  
  .unified-chart-container {
    height: 350px;
  }
  
  .steps-nav {
    margin: 25px 0;
  }
  
  .system-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .result-card {
    grid-template-columns: repeat(2, 1fr);
  }

  .selected-appliance-controls {
    gap: 5px;
  }
  
  .selected-appliance-controls label {
    font-size: 12px;
  }
  
  .appliance-quantity, .appliance-hours, .appliance-wattage {
    width: 80px;
  }
}

/* Small screens (mobile) */
@media (max-width: 768px) {

  .add-custom-appliance-section {
    padding: 10px;
  }
  
  .custom-appliance-form {
    padding: 10px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .savings-disclaimer {
    padding: 10px;
    font-size: 12px;
  }
  
  .savings-disclaimer i {
    font-size: 16px;
  }

  #search-input, #appliance-search {
    padding: 10px;
    font-size: 14px;
  }
  .selected-appliances {
    padding: 0px;
  }
  
  .selected-appliance-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    position: relative;
  }
  
  .selected-appliance-name {
    margin-bottom: 8px;
    width: 100%;
    padding-right: 30px;
  }
  
  .remove-appliance {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  
  .selected-appliance-controls {
    width: 100%;
    justify-content: start;
    margin-bottom: 8px;
  }
  
  .selected-appliance-usage {
    align-self: flex-end;
    width: 100%;
    text-align: right;
    margin-top: 5px;
  }
  
  .usage-summary {
    flex-direction: column;
    gap: 5px;
  }

  .calculator-container {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  /* Fixed steps navigation for mobile */
  .steps-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
    margin: 15px 0;
    -webkit-overflow-scrolling: touch;
  }
  
  .step-item {
    flex-shrink: 0;
    padding: 10px 5px;
    min-width: auto;
  }
  
  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
    margin-bottom: 5px;
  }
  
  .step-title {
    font-size: 12px;
  }
  
  /* Content spacing */
  .step-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .system-type-card h4 {
    font-size: 14px;
  }
  
  .step-content p {
    font-size: 12px;
    margin-bottom: 15px;
    max-width: 100%;
  }
  
  /* Button adjustments */
  .step-action {
    margin-top: 20px;
    flex-direction: row;
    gap: 10px;
  }
  
  .step-action button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
  }
  
  /* Chart adjustments */
  .chart-container {
    height: 300px;
  }
  
  .unified-chart-container {
    height: 280px;
    padding: 10px;
  }
  
  /* Month selector */
  .month-selector-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
  }
  
  #month-selector {
    flex: 1;
    font-size: 14px;
    padding: 8px;
  }
  
  /* Result cards */
  .result-card {
    gap: 15px;
    margin: 20px 0;
    grid-template-columns: 1fr;
  }
  
  .result-card > div {
    padding: 15px;
  }
  
  .result-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .result-card p {
    font-size: 22px;
    margin-bottom: 5px;
  }
  
  /* Results sections */
  .results-section {
    padding: 15px;
    margin: 20px 0;
  }
  
  .results-section h4 {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .results-section .subtitle {
    font-size: 14px;
  }
  
  /* Tech details grid */
  .tech-details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  /* Panel visualization */
  .panel-settings-visual {
    flex-direction: column;
    gap: 20px;
  }
  
  .panel-visualization {
    min-width: 100%;
    height: 250px;
  }
  
  /* Results actions */
  .results-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Very small screens (small phones) */
@media (max-width: 480px) {
  .selected-appliances {
    padding: 0px;
  }
  
  .selected-appliance-item {
    padding: 10px;
  }
  
  .selected-appliance-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .selected-appliance-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    min-width: 70px;
  }
  
  .appliance-quantity, .appliance-hours, .appliance-wattage {
    width: 50px;
    padding: 4px;
    font-size: 12px;
  }
  
  .selected-appliance-usage {
    font-size: 14px;
  }
  
  .usage-summary {
    font-size: 14px;
  }

  .calculator-container {
    padding: 10px;
  }
  
  /* Further reduce step sizes */
  .step-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  .step-title {
    font-size: 10px;
  }
  
  /* Adjust content headings */
  .step-content h3 {
    font-size: 18px;
  }
  
  /* Make sufficiency meter more compact */
  .sufficiency-container {
    margin: 15px 0;
  }
  
  .sufficiency-meter {
    height: 30px;
  }
  
  .sufficiency-text {
    font-size: 14px;
  }
  
  .sufficiency-description {
    font-size: 14px;
  }
  
  /* Compact explanation section */
  .explanation-item {
    padding: 10px;
  }
  
  .explanation-item h5 {
    font-size: 14px;
    margin-bottom: 5px;
  }
  
  .explanation-item p {
    font-size: 12px;
    line-height: 1.4;
  }
  
  /* Adjust chart heights */
  .unified-chart-container {
    height: 250px;
    margin-bottom: 15px;
  }
  
  /* Energy calculator adjustments */
  .appliance-calculator .toggle-btn {
    font-size: 14px;
    padding: 8px 12px;
  }
  
  .appliance-section {
    padding: 15px;
  }
  
  .appliance-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 250px;
  }
  
  .category-filter {
    gap: 5px;
  }
  
  .category-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  /* Map adjustments */
  #map {
    height: 300px;
  }
}