/* =============================================================================
   DATABASE SIZING CALCULATOR - STYLESHEET
   =============================================================================
   Interactive calculator for determining Azure SQL tier recommendations
   ============================================================================= */

.db-calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  max-width: 1200px;
}

.calculator-inputs {
  grid-column: 1;
}

.calculator-result {
  grid-column: 2;
}

.toggle-label {
  font-weight: 600;
  color: #071B36;
  font-size: 1rem;
}

.toggle-switch {
  display: flex;
  gap: 0;
  background: white;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  overflow: hidden;
}

.toggle-switch input[type="radio"] {
  display: none;
}

.toggle-switch label {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #434c5a;
  border-right: 1px solid #e5e7eb;
}

.toggle-switch label:last-child {
  border-right: none;
}

.toggle-switch input[type="radio"]:checked + label {
  background: #D85F42;
  color: white;
}

.toggle-switch label:hover {
  background: #fef7f0;
}

.toggle-switch input[type="radio"]:checked + label:hover {
  background: #c54d2a;
}

.calculator-inputs {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sql-questions,
.snowflake-questions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.snowflake-questions {
  display: none;
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.input-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Toggle section (first child of calculator-inputs) needs container styling */
.calculator-inputs > .input-section:first-child {
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 0.5rem;
  justify-content: flex-start;
}

.input-section label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: #071B36;
}

.label-text {
  font-size: 0.95rem;
}

.label-value {
  font-weight: 600;
  color: #D85F42;
  min-width: 80px;
  text-align: right;
}

.slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 4px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #D85F42;
  border-radius: 50%;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #D85F42;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.select-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #f8fafc;
  color: #434c5a;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.select-input:focus {
  outline: none;
  border-color: #D85F42;
}

.calculator-result {
  grid-column: 2;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 2rem;
  align-self: start;
  min-height: 100%;
  box-shadow: 0 4px 12px rgba(7, 27, 54, 0.08);
}

.result-header {
  background: #071B36;
  color: white;
  padding: 1.25rem 1.5rem;
}

.result-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.result-content {
  padding: 1.5rem;
}

.result-tier {
  font-size: 1.5rem;
  font-weight: 700;
  color: #071B36;
  margin-bottom: 0.5rem;
}

.result-cost {
  font-size: 1.25rem;
  font-weight: 600;
  color: #D85F42;
  margin-bottom: 1.5rem;
}

.result-details p {
  margin: 1rem 0 0.5rem 0;
  font-weight: 600;
  color: #071B36;
  font-size: 0.95rem;
}

.result-details p:first-child {
  margin-top: 0;
}

.result-details pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0.5rem 0 0 0;
}

.result-details ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
  color: #434c5a;
  line-height: 1.7;
}

.result-details li {
  margin-bottom: 0.25rem;
}

.help-text {
  display: block;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 400;
}

@media (max-width: 900px) {
  .db-calculator-container {
    grid-template-columns: 1fr;
  }

  .calculator-inputs {
    grid-column: 1;
  }

  .calculator-result {
    grid-column: 1;
    position: static;
  }
}
