/* Treatment Cost Estimator Styling */

.estimator-form {
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.9rem;
}

.estimator-action-row {
  margin-top: 0.35rem;
}

.estimator-submit-btn {
  min-width: 180px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(21, 128, 61, 0.18);
}

.estimator-submit-btn:hover,
.estimator-submit-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(21, 128, 61, 0.24);
}

.estimate-box {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  min-height: 108px;
}

.estimate-box:hover {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.14);
}

.estimate-box::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(15, 23, 42, 0.08);
}

.estimate-box.estimate-tariff {
  border-left: none;
}

.estimate-box.estimate-coverage {
  border-left: none;
}

.estimate-box.estimate-aid {
  border-left: none;
  background: linear-gradient(180deg, #f7fff9 0%, #f2fbf4 100%);
}

.estimate-box.estimate-patient {
  border-left: none;
  background: linear-gradient(180deg, #f7faff 0%, #f1f6ff 100%);
}

.estimate-box.estimate-tariff::before {
  background: linear-gradient(180deg, #2f80ed 0%, #56ccf2 100%);
}

.estimate-box.estimate-coverage::before {
  background: linear-gradient(180deg, #64748b 0%, #94a3b8 100%);
}

.estimate-box.estimate-aid::before {
  background: linear-gradient(180deg, #17a34a 0%, #22c55e 100%);
}

.estimate-box.estimate-patient::before {
  background: linear-gradient(180deg, #2563eb 0%, #60a5fa 100%);
}

.estimate-label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.estimate-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.estimate-value.text-success {
  color: #15803d;
}

.estimate-value.text-primary {
  color: #1d4ed8;
}

.estimate-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.45rem;
  line-height: 1.35;
}

/* Estimator result grid */
#estimatorResults {
  animation: fadeIn 0.3s ease-in-out;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
  border-radius: 1rem;
  padding: 1rem 1rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

#estimatorResults > .row {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

#estimatorResults > .row > [class*='col-'] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

#estimatorResults .row.mt-3 {
  margin-top: 0.75rem !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .estimate-box {
    min-height: 0;
    padding: 0.9rem 1rem;
  }

  .estimate-value {
    font-size: 1.2rem;
  }

  .estimator-form {
    padding: 1rem;
  }

  #estimatorResults {
    padding: 0.85rem;
  }

  .estimator-submit-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 992px) {
  #estimatorResults .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  #estimatorResults .row.mt-3 {
    margin-top: 0.85rem !important;
  }

  #estimatorResults .row > [class*='col-'] {
    max-width: none;
    flex: none;
  }
}

/* Alert styling */
#estimatorWarnings .alert {
  margin-bottom: 0.75rem;
  border-radius: 0.25rem;
}

/* Loading spinner */
#estimatorSpinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Estimator form styling */
#estimatorForm .form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #212529;
}

#estimatorForm .form-control {
  border-radius: 0.25rem;
  border: 1px solid #ced4da;
}

#estimatorForm .form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Disclaimer box */
#estimatorResults .alert-info {
  background: linear-gradient(180deg, #eff6ff 0%, #eaf2ff 100%);
  border-color: rgba(37, 99, 235, 0.15);
  color: #1e3a8a;
  margin-top: 1rem;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}
