/**
 * Agent Eight Loss-Framed ROI Calculator - Styles
 */

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  /* Stack two-column layout on tablets and smaller */
  .calculator-two-col {
    grid-template-columns: 1fr !important;
  }

  .calculator-left-col,
  .calculator-right-col {
    min-height: auto !important;
  }

  .calculator-right-col {
    padding: 48px 32px !important;
  }
}

@media (max-width: 768px) {
  /* Stack grid layouts */
  .value-breakdown > div:first-child {
    grid-template-columns: 1fr !important;
  }

  .pipeline-split {
    grid-template-columns: 1fr !important;
  }

  .pipeline-comparison {
    grid-template-columns: 1fr !important;
  }

  /* Adjust heading sizes */
  .calculator-left-col h1 {
    font-size: 32px !important;
  }

  /* Reduce padding */
  .calculator-left-col,
  .calculator-right-col {
    padding: 40px 24px !important;
  }

  #full-width-sections {
    padding: 40px 16px !important;
  }

  /* Stack time savings grid */
  #time-savings-section > div > div > div:first-child {
    grid-template-columns: 1fr !important;
  }

  .breakdown-card {
    padding: 24px !important;
  }

  .value-breakdown h3 {
    font-size: 24px !important;
  }
}

@media (max-width: 480px) {
  .calculator-left-col h1 {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }

  .calculator-left-col p {
    font-size: 16px !important;
  }

  .main-result p:nth-child(2) {
    font-size: 42px !important;
  }

  #calls-value {
    font-size: 24px !important;
  }
}

/* Button hover effects with Apple-like easing */
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#calculate-btn:hover {
  background: linear-gradient(135deg, #0051d5 0%, #003d9e 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,122,255,0.4) !important;
}

#calculate-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a[href*="calendar.app.google"]:hover {
  background: linear-gradient(135deg, #0051d5 0%, #003d9e 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,122,255,0.4) !important;
}

a[href*="#contact-us"]:hover {
  background: rgba(255,255,255,0.15) !important;
  transform: translateY(-1px);
}

/* Accordion button hover */
.accordion-trigger:hover {
  background: #eaeef5 !important;
  transform: translateY(-1px);
}

/* Smooth transitions */
#detailed-pipeline,
#speed-explainer-content,
#advanced-content,
#results-content {
  transition: all 0.3s ease;
}

/* Tooltip positioning fix for mobile */
@media (max-width: 480px) {
  .tooltip {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 90vw !important;
  }
}

/* Print styles */
@media print {
  .accordion-trigger,
  .cta-section,
  button,
  a[href] {
    display: none !important;
  }

  #detailed-pipeline,
  #speed-explainer-content,
  #advanced-content {
    display: block !important;
  }

  .calculator-two-col {
    grid-template-columns: 1fr !important;
  }

  .calculator-right-col {
    background: white !important;
    color: black !important;
  }
}

/* Accessibility improvements */
input[type="range"]:focus,
input[type="number"]:focus,
button:focus,
a:focus {
  outline: 2px solid #2655FF;
  outline-offset: 2px;
}

input[type="checkbox"]:focus {
  outline: 2px solid #2655FF;
  outline-offset: 2px;
}

/* Loading/active states */
#calculate-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* Range slider styling for better cross-browser support */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2655FF;
  cursor: pointer;
  transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #1a44cc;
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2655FF;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #1a44cc;
  transform: scale(1.1);
}

/* Apple-style animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

#results-content {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#full-width-sections {
  animation: fadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* Card hover effects */
.breakdown-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breakdown-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08) !important;
}

/* Glass card hover effects */
.roi-quick-stats > div {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-quick-stats > div:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Input field transitions */
input[type="number"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="number"]:hover {
  border-color: #007aff !important;
  background: #ffffff !important;
}

input[type="number"]:focus {
  border-color: #007aff !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(0,122,255,0.1) !important;
}

/* Range slider smooth transitions */
input[type="range"] {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Pulse animation for important numbers */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Accordion smooth expand/collapse */
#detailed-pipeline,
#speed-explainer-content,
#advanced-content {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 5000px;
  overflow: hidden;
}

/* Stagger animation for pipeline branches */
.pipeline-branch {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pipeline-branch:hover {
  transform: translateY(-2px);
}

/* Checkbox smooth transition */
input[type="checkbox"] {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button click animation */
button:active {
  transform: scale(0.97);
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

a:active {
  transform: scale(0.98);
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
