/* Calculator Containers */
.calculator-container {
  display: none;
  padding: 30px;
}

/* Results Section */
.results {
  margin-top: 20px;
  /* Add top margin to results section */
  background-color: var(--input-background);
  border-radius: var(--border-radius);
  padding: 25px;
  display: none;
  border: 1px solid var(--border-color);
}

.results h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.result-item span:first-child {
  font-weight: 500;
}

.calculation-section {
  margin-bottom: 25px;
}

.section-title {
  font-weight: 500;
  color: var(--primary-color);
  margin: 15px 0;
  font-size: 16px;
}

.section-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 25px 0;
}

.total-tax {
  margin-top: 10px;
  font-weight: bold;
  font-size: 18px;
}

.total-tax span:last-child {
  color: var(--primary-color);
}

/* Make the asterisk in Total Tax red */
.total-tax sup {
  color: var(--error-color);
}

.rebate span:last-child {
  color: var(--success-color);
}

/* Form Elements Styling for Dark Mode */
input:-webkit-autofill {
  -webkit-animation-name: autofill;
  -webkit-animation-fill-mode: both;
  -webkit-text-fill-color: var(--text-color) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-background) inset !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--text-color);
}

input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-color) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-background) inset !important;
}

input:focus {
  background-color: transparent !important;
  color: var(--text-color) !important;
  outline: none;
}

/* Fix for form elements */
select,
input,
textarea {
  background-color: var(--input-background) !important;
  color: var(--text-color) !important;
  border: none;
}

/* Additional styles to prevent browser focus issues */
.price-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(51, 115, 220, 0.25);
}

/* Additional style for price input to prevent overflow */
.price-input-wrapper input[type="text"] {
  width: 100%;
  padding: 12px 12px 12px 25px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  background-color: transparent;
  color: var(--text-color);
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Error message styling */
#toronto_priceError,
#ontario_priceError {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 5px;
  display: none;
}