/* estimate-calculator.css — Styles for Instant Estimate Calculator */

/* ===== CALCULATOR CONTAINER ===== */
.estimate-calculator-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  animation: slideUp 500ms var(--transition-fast);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== PROGRESS BAR ===== */
.estimate-progress {
  width: 100%;
  height: 6px;
  background: var(--color-divider);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-cta), var(--color-primary));
  transition: width 400ms var(--transition-medium);
  border-radius: var(--radius-full);
}

.progress-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  font-weight: 500;
}

/* ===== FORM CONTAINER ===== */
.estimate-form-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-height: 300px;
  animation: fadeIn 300ms var(--transition-fast);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.estimate-form-container h2 {
  font-size: var(--text-xl);
  color: var(--color-text);
  margin: 0;
}

.estimate-form-container > p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0;
}

/* ===== STEP 1: SERVICE GRID ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface-2);
  border: 2px solid var(--color-divider);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-medium);
  min-height: 140px;
}

.service-card:hover {
  border-color: var(--color-cta);
  background: var(--color-bg);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card:active {
  transform: translateY(-2px);
}

.service-icon {
  font-size: 2.5rem;
}

.service-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

/* ===== FORM GROUPS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.1);
}

.form-group textarea {
  font-family: var(--font-body);
  resize: vertical;
  min-height: 100px;
}

/* ===== SLIDER ===== */
.slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-divider);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-cta);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-cta);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.slider::-moz-range-thumb:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.1);
}

.slider::-moz-range-track {
  background: none;
  border: none;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

/* ===== RADIO & CHECKBOX GROUPS ===== */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--color-surface-2);
  transition: all var(--transition-fast);
}

.radio-option:hover,
.checkbox-option:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"],
.checkbox-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  cursor: pointer;
  width: 20px;
  height: 20px;
  margin: 0;
}

.radio-option span,
.checkbox-option span {
  font-size: var(--text-base);
  color: var(--color-text);
}

.radio-option input:checked + span,
.checkbox-option input:checked + span {
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== NOTE ===== */
.note {
  background: var(--color-surface-2);
  border-left: 4px solid var(--color-warning);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===== STEP 3: ESTIMATE DISPLAY ===== */
.estimate-display {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-text-inverse);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  text-align: center;
  animation: slideUp 500ms var(--transition-fast);
}

.estimate-amount {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.dollar {
  font-size: 0.7em;
}

.number {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  line-height: 1;
}

.separator {
  font-weight: 300;
}

.estimate-disclaimer {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-top: var(--space-6);
  line-height: 1.6;
}

.estimate-details {
  margin-top: var(--space-6);
}

.estimate-details h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.estimate-details ul {
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.estimate-details li {
  padding-left: var(--space-6);
  position: relative;
  font-size: var(--text-base);
  line-height: 1.5;
}

.estimate-details li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
  font-size: 1.2em;
}

/* ===== ACTIONS ===== */
.estimate-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: space-between;
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.btn-back,
.btn-next,
.btn-submit {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 640px) {
  .estimate-actions {
    flex-direction: column;
  }

  .btn-back {
    order: 2;
  }

  .btn-next,
  .btn-submit {
    order: 1;
  }
}

/* ===== SUCCESS STATE ===== */
.estimate-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12);
  min-height: 400px;
  animation: slideUp 500ms var(--transition-fast);
}

.success-icon {
  font-size: 4rem;
  color: var(--color-success);
  margin-bottom: var(--space-4);
  animation: scaleIn 500ms var(--transition-fast);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.estimate-success h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.estimate-success p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .estimate-calculator-wrapper {
    padding: var(--space-6);
    gap: var(--space-6);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .estimate-amount {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .estimate-actions {
    gap: var(--space-3);
  }
}

@media (max-width: 480px) {
  .estimate-calculator-wrapper {
    padding: var(--space-4);
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .estimate-form-container h2 {
    font-size: var(--text-lg);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .estimate-calculator-wrapper,
  .estimate-form-container,
  .estimate-display,
  .estimate-success,
  .success-icon,
  .service-card,
  .slider::-webkit-slider-thumb,
  .slider::-moz-range-thumb,
  .radio-option,
  .checkbox-option {
    animation: none;
    transition: none;
  }
}
