/* ==========================================================================
   WattsToAh.com - Modern Utility & Solar Theme Stylesheet
   Pure CSS utilities, custom form sliders, transitions, and print styles.
   ========================================================================== */

/* Root CSS Variables for seamless light/dark mode accenting */
:root {
  --solar-amber: #f59e0b;
  --solar-amber-hover: #d97706;
  --solar-amber-light: #fef3c7;
  --solar-glow: rgba(245, 158, 11, 0.25);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Base transitions */
button, input, select, a {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Segmented Buttons Active State Styles */
.voltage-btn.active-voltage,
.autonomy-btn.active-autonomy {
  background-color: var(--solar-amber);
  color: #0f172a !important;
  border-color: var(--solar-amber);
  box-shadow: 0 4px 12px var(--solar-glow);
  font-weight: 700;
}

.voltage-btn:not(.active-voltage),
.autonomy-btn:not(.active-autonomy) {
  background-color: transparent;
  border-color: #e2e8f0;
  color: #334155;
}

.dark .voltage-btn:not(.active-voltage),
.dark .autonomy-btn:not(.active-autonomy) {
  border-color: #334155;
  color: #cbd5e1;
}

.voltage-btn:not(.active-voltage):hover,
.autonomy-btn:not(.active-autonomy):hover {
  border-color: var(--solar-amber);
  color: var(--solar-amber);
  background-color: rgba(245, 158, 11, 0.05);
}

/* Chemistry Card Active States */
.chem-card.active-chem {
  border-color: var(--solar-amber) !important;
  background-color: rgba(245, 158, 11, 0.04);
  box-shadow: 0 0 0 1px var(--solar-amber), 0 4px 14px var(--solar-glow);
}

.chem-card.active-chem .chem-radio-dot {
  border-color: var(--solar-amber) !important;
}

.chem-card.active-chem .chem-radio-dot > div {
  background-color: var(--solar-amber) !important;
}

/* Custom Range Slider Styling (WebKit: Chrome, Edge, Safari) */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background-color: #e2e8f0;
  cursor: pointer;
}

.dark input[type="range"]::-webkit-slider-runnable-track {
  background-color: #334155;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: grab;
  margin-top: -7px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.dark input[type="range"]::-webkit-slider-thumb {
  border: 3px solid #0f172a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

input[type="range"]:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.1);
}

/* Range Slider Styling (Firefox) */
input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background-color: #e2e8f0;
  cursor: pointer;
}

.dark input[type="range"]::-moz-range-track {
  background-color: #334155;
}

input[type="range"]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: grab;
}

.dark input[type="range"]::-moz-range-thumb {
  border: 3px solid #0f172a;
}

/* Number Input without ugly browser spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* FAQ Item transition */
.faq-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.is-open {
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.08);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

/* Subtle amber pulse for key results */
@keyframes solarPulse {
  0%, 100% {
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
  }
  50% {
    text-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
  }
}

.number-highlight {
  animation: solarPulse 3s infinite ease-in-out;
}

/* Print Stylesheet for clean export */
@media print {
  header, footer, #presets-container, #faq, #reference-table, #toggle-advanced-btn, .action-buttons {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .bg-white, .dark\:bg-slate-900, .bg-slate-50, .dark\:bg-slate-850 {
    background: #ffffff !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
  }

  #output-recommended-ah {
    color: #d97706 !important;
  }
}
