.medical-cost-comparison {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
  font-family: system-ui, -apple-system, sans-serif;
}

.comparison-container {
  background: #f0fbf1;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 24px;
}

.comparison-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 24px 0;
}

.form-container {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .form-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.select-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.select-wrapper label {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
}

.select-container {
  position: relative;
}

.select-container select {
  width: 100%;
  padding: 10px 16px;
  font-size: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  appearance: none;
  color: #1a1a1a;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #6b7280;
  pointer-events: none;
}

.compare-button {
  width: 100%;
  padding: 12px 24px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.compare-button:hover {
  background: #1d4ed8;
}

.results-container {
  margin-top: 32px;
}

.results-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

.table-responsive {
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px;
}

.cost-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
}

.cost-table th,
.cost-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.cost-table th {
  background: #f9fafb;
  font-weight: 500;
  color: #4b5563;
  position: sticky;
  top: 0;
}

.cost-table tr:last-child td {
  border-bottom: none;
}

.cost-table tbody tr {
  transition: background-color 0.2s;
}

.cost-table tbody tr:hover {
  background-color: #f9fafb;
}

.cost-table tr.highlight {
  background-color: #dbeafe;
}

.cost-table tr.highlight:hover {
  background-color: #bfdbfe;
}

@media (max-width: 640px) {
  .comparison-container {
    padding: 16px;
  }

  .table-responsive {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .cost-table {
    display: block;
  }

  .cost-table thead {
    display: none;
  }

  .cost-table tbody {
    display: block;
  }

  .cost-table tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
  }

  .cost-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: none;
  }

  .cost-table td::before {
    content: attr(data-label);
    font-weight: 500;
    color: #4b5563;
  }
}

