/* Custom styles for the advanced calculator */

/* Results dropdown */
.results-dropdown {
  position: absolute;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 5px;
  left: 0;
  right: 0;
}

.result-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

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

.result-item:hover {
  background-color: var(--background-light);
  color: var(--primary-color);
}

/* Position the form-group containing the postcode input */
.form-group {
  position: relative;
  margin-bottom: 20px;
}

/* Delivery options */
#delivery-options {
  margin: 20px 0;
  padding: 15px;
  background-color: var(--background-light);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#delivery-options p {
  margin-bottom: 15px;
  font-weight: 500;
}

#delivery-options button {
  margin-right: 10px;
}

/* Advanced delivery container */
#delivery-address-container {
  margin-top: 20px;
  padding: 20px;
  background-color: var(--background-light);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#delivery-address-container h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* Make the calculator results more prominent */
.calculator-results {
  position: relative;
}

#output-container {
  margin-bottom: 20px;
  padding: 15px;
  background-color: rgba(193, 30, 43, 0.05);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.5;
}

/* Improve responsiveness for the calculator section */
@media (max-width: 767px) {
  #delivery-options button {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  #delivery-address-container {
    padding: 15px;
  }
}

/* Highlight active delivery option */
#delivery-options button.active {
  background-color: var(--primary-color);
  color: white;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading:after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  right: 10px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: button-loading-spinner 0.6s linear infinite;
}

@keyframes button-loading-spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
