/* Custom styles for the Homebuyer Delusion Calculator */

/* Form styling improvements */
.calculator-form select:focus,
.calculator-form input[type="checkbox"]:focus,
.calculator-form input[type="radio"]:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Animation for the delusion score circle */
.delusion-score-circle {
  animation: scoreReveal 1.5s ease-out;
}

@keyframes scoreReveal {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Spin animation for loading */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hover effects for cards */
.calculator-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    background: white !important;
  }
  
  .bg-gradient-to-br,
  .bg-gradient-to-r {
    background: white !important;
    border: 1px solid #ccc !important;
  }
}

/* Loading animation for form submission */
.form-submitting {
  opacity: 0.7;
  pointer-events: none;
}

.form-submitting .submit-button {
  position: relative;
}

.form-submitting .submit-button::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Interactive Elements Styles */

/* Tab styling */
.interactive-tab {
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.interactive-tab:hover {
  color: #ffffff !important;
  border-color: #a855f7 !important;
}

.interactive-tab.active {
  color: #e2e8f0 !important;
  border-color: #a855f7 !important;
}

/* Tab panels */
.tab-panel {
  transition: opacity 0.3s ease;
}

.tab-panel.hidden {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Budget slider styling */
.budget-slider-container .slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.budget-slider-container .slider::-webkit-slider-track {
  background: #4b5563;
  height: 8px;
  border-radius: 4px;
}

.budget-slider-container .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #8b5cf6;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.budget-slider-container .slider::-webkit-slider-thumb:hover {
  background: #7c3aed;
  transform: scale(1.1);
}

.budget-slider-container .slider::-moz-range-track {
  background: #4b5563;
  height: 8px;
  border-radius: 4px;
  border: none;
}

.budget-slider-container .slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #8b5cf6;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.budget-slider-container .slider::-moz-range-thumb:hover {
  background: #7c3aed;
  transform: scale(1.1);
}

/* Feature item animations */
.feature-item {
  transition: all 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Savings scenario styling */
.savings-scenario {
  transition: all 0.2s ease;
}

.savings-scenario:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Adjustment item styling */
.adjustment-item {
  transition: all 0.2s ease;
}

.adjustment-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  background-color: #374151;
}

/* Responsive adjustments for interactive elements */
@media (max-width: 768px) {
  .interactive-tab {
    font-size: 0.875rem;
    padding: 0.5rem 0.25rem;
  }
  
  .tab-content {
    font-size: 0.875rem;
  }
  
  .budget-slider-container .slider::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
  }
  
  .budget-slider-container .slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
  }
}

/* Print styles for interactive elements */
@media print {
  .interactive-tab,
  .tab-content,
  .budget-slider-container {
    display: none !important;
  }
}
