/**
 * ADEPT QUALITY SERVICES / ADEQUS
 * Cognitive AI Automation Calculator Stylesheet
 * 
 * Clean corporate engineering design language matching the Adequs brand:
 * Deep Navy (#0A2540), Tech Indigo (#635BFF), Cyan Accent (#00AEEF),
 * Crisp Slate Neutrals, Elegant Active States, and Mobile Sticky Action Bar.
 */

/* Step Transitions & Containers */
.ai-step-pane {
  display: none;
  animation: aiFadeSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ai-step-pane.active {
  display: block;
}

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

/* Wizard Selection Cards */
.ai-option-card {
  position: relative;
  cursor: pointer;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  background-color: #FFFFFF;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.ai-option-card:hover {
  border-color: #CBD5E1;
  background-color: #F8FAFC;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.06);
}

.ai-option-card.selected {
  border-color: #635BFF;
  background-color: #F8FAFF;
  box-shadow: 0 0 0 1px #635BFF, 0 8px 20px -4px rgba(99, 91, 255, 0.15);
}

/* Radio / Checkbox Indicator Inside Card */
.ai-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-option-card.selected .ai-indicator {
  border-color: #635BFF;
  background-color: #635BFF;
}

.ai-indicator-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #FFFFFF;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.ai-option-card.selected .ai-indicator-inner {
  opacity: 1;
  transform: scale(1);
}

/* Checkbox Style Indicator for Multi-Select */
.ai-checkbox-indicator {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #CBD5E1;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-option-card.selected .ai-checkbox-indicator {
  border-color: #635BFF;
  background-color: #635BFF;
  color: #FFFFFF;
}

/* Workflow Diagram Nodes */
.ai-workflow-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  min-width: 110px;
}

.ai-workflow-node:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-weight: bold;
  font-size: 14px;
}

@media (max-width: 768px) {
  .ai-workflow-node:not(:last-child)::after {
    display: none;
  }
}

/* Number Counter Component */
.ai-counter-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background-color: #F8FAFC;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0F172A;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-counter-btn:hover:not(:disabled) {
  background-color: #EEF2F6;
  border-color: #CBD5E1;
}

.ai-counter-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Progress Bar */
.ai-progress-bar-fill {
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #635BFF 0%, #00AEEF 100%);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky Estimate Summary Sidebar */
.ai-sticky-summary {
  position: sticky;
  top: 96px;
  z-index: 20;
}

/* Mobile Sticky Bottom Bar */
.ai-mobile-sticky-bar {
  display: none;
}

@media (max-width: 1024px) {
  .ai-mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0A2540;
    color: #FFFFFF;
    padding: 12px 16px;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Toggle Switch */
.ai-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.ai-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ai-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.ai-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.ai-toggle-switch input:checked + .ai-toggle-slider {
  background-color: #635BFF;
}

.ai-toggle-switch input:checked + .ai-toggle-slider:before {
  transform: translateX(20px);
}

/* Sliders */
input[type=range].ai-range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #E2E8F0;
  outline: none;
}

input[type=range].ai-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #635BFF;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 91, 255, 0.4);
  border: 2px solid #FFFFFF;
}

input[type=range].ai-range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #635BFF;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 91, 255, 0.4);
  border: 2px solid #FFFFFF;
}

/* Print Optimization */
@media print {
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
  }
  
  header,
  footer,
  .ai-mobile-sticky-bar,
  .ai-step-navigation,
  .ai-no-print {
    display: none !important;
  }

  .ai-sticky-summary {
    position: static !important;
  }

  .ai-step-pane {
    display: block !important;
  }

  .ai-option-card {
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
  }
}
