/* ============================================
   iDoctors Express - Enhanced Responsive Design
   Sfondo grigio chiaro + Loader premium + Card modelli
   ============================================ */

:root {
  /* Colori Originali Mantenuti */
  --primary-color: #f39c12;
  --primary-dark: #e67e22;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  
  /* Sfondo Grigio Chiaro Elegante */
  --background: #f5f5f5;
  --background-light: #fafafa;
  --card-bg: #ffffff;
  
  /* Testi */
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-light: #94a3b8;
  
  /* Borders */
  --border-color: #e0e0e0;
  --border-light: #eeeeee;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
  
  /* Radius */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============================================
   LOADER PREMIUM - ANIMAZIONE SPETTACOLARE
   ============================================ */

#initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #d35400 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Effetti di sfondo animati */
#initial-loader::before,
#initial-loader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: floatBlob 8s ease-in-out infinite;
}

#initial-loader::before {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

#initial-loader::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-delay: 2s;
}

@keyframes floatBlob {
  0%, 100% { 
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% { 
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.6;
  }
}

#initial-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  color: white;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  max-width: 500px;
}

/* Icona Logo Animata */
.loader-icon {
  font-size: clamp(70px, 15vw, 100px);
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
  animation: iconBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

@keyframes iconBounce {
  0%, 100% { 
    transform: translateY(0) scale(1);
  }
  25% { 
    transform: translateY(-20px) scale(1.05);
  }
  50% { 
    transform: translateY(-30px) scale(1.08);
  }
  75% { 
    transform: translateY(-20px) scale(1.05);
  }
}

/* Cerchi concentrici attorno all'icona */
.loader-icon::before,
.loader-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  animation: rippleOut 2s ease-out infinite;
}

.loader-icon::before {
  width: 140px;
  height: 140px;
  animation-delay: 0s;
}

.loader-icon::after {
  width: 180px;
  height: 180px;
  animation-delay: 0.5s;
}

@keyframes rippleOut {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

.loader-title {
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9; }
}

.loader-subtitle {
  font-size: clamp(15px, 3.5vw, 18px);
  opacity: 0.95;
  margin-bottom: 40px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Spinner Moderno Triplo */
.loader-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 28px;
  position: relative;
}

.loader-spinner::before,
.loader-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 4px solid transparent;
}

.loader-spinner::before {
  width: 60px;
  height: 60px;
  border-top-color: white;
  border-right-color: white;
  animation: spinFast 1.2s linear infinite;
}

.loader-spinner::after {
  width: 46px;
  height: 46px;
  top: 7px;
  left: 7px;
  border-top-color: rgba(255, 255, 255, 0.5);
  border-right-color: rgba(255, 255, 255, 0.5);
  animation: spinFast 0.8s linear infinite reverse;
}

@keyframes spinFast {
  to { transform: rotate(360deg); }
}

/* Progress Bar Elegante */
.loader-progress {
  width: min(350px, 85vw);
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.loader-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent
  );
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(255, 255, 255, 1) 50%, 
    rgba(255, 255, 255, 0.9) 100%
  );
  background-size: 200% 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
  animation: shimmer 1.5s linear infinite;
  position: relative;
}

.loader-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.5), 
    transparent
  );
  animation: slideShine 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes slideShine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.loader-status {
  font-size: clamp(14px, 3vw, 16px);
  opacity: 0.85;
  min-height: 24px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.repair-booking {
  background-color: var(--background);
  min-height: 100vh;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.repair-booking.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HEADER - SCROLLABILE
   ============================================ */

.repair-header {
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 0;
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.header-top {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: max(env(safe-area-inset-top, 16px) + 12px, 28px) 20px 20px;
  position: relative;
  overflow: hidden;
}

/* Pattern decorativo */
.header-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(243, 156, 18, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.header-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
  animation: logoPulse 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.header-logo:active {
  transform: scale(0.95);
}

.header-text {
  text-align: left;
}

.header-text h1 {
  margin: 0;
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-text p {
  margin: 4px 0 0 0;
  font-size: clamp(13px, 3vw, 15px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.header-stats {
  background: var(--card-bg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.stat-item {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--background-light);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-light);
}

.stat-item:hover {
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.08) 0%, 
    rgba(230, 126, 34, 0.12) 100%);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-item:active {
  transform: translateY(0);
}

.stat-icon {
  font-size: 26px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   BODY
   ============================================ */

.repair-body {
  padding: 20px;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: max(env(safe-area-inset-bottom, 20px) + 20px, 40px);
}

/* ============================================
   STEPS INDICATOR - STICKY
   ============================================ */

.steps {
  display: flex;
  justify-content: space-between;
  margin: 0 0 24px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.steps::-webkit-scrollbar {
  display: none;
}

.steps::before {
  content: '';
  position: absolute;
  top: 33px;
  left: 40px;
  right: 40px;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 0 0 auto;
  min-width: 60px;
  padding: 0 4px;
}

.step-number {
  width: 38px;
  height: 38px;
  background-color: var(--background-light);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 8px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.step.active .step-number {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.step-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.step.active .step-title {
  color: var(--primary-color);
  font-weight: 700;
}

/* ============================================
   FORM STEPS
   ============================================ */

.form-step {
  display: none;
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
  display: block;
}

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

.form-step h2 {
  font-size: clamp(24px, 6vw, 32px);
  margin: 0 0 24px 0;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ============================================
   BARRA DI RICERCA MODELLI
   ============================================ */

.model-search-container {
  margin-bottom: 24px;
  position: relative;
}

.model-search-input {
  width: 100%;
  padding: 16px 48px 16px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  background: var(--card-bg);
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.model-search-input:hover {
  border-color: var(--primary-color);
}

.model-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1),
              var(--shadow-md);
}

.model-search-input::placeholder {
  color: var(--text-light);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 18px;
  pointer-events: none;
}

/* ============================================
   CARD MODELLI - GRID RESPONSIVE
   ============================================ */

.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.model-card {
  background: var(--card-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.model-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.05) 0%, 
    rgba(230, 126, 34, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.model-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.model-card:hover::before {
  opacity: 1;
}

.model-card.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.08) 0%, 
    rgba(230, 126, 34, 0.12) 100%);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1),
              var(--shadow-md);
}

.model-card.selected::before {
  opacity: 1;
}

.model-card-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--primary-color);
  display: block;
  transition: var(--transition);
}

.model-card:hover .model-card-icon {
  transform: scale(1.1);
}

.model-card.selected .model-card-icon {
  transform: scale(1.15);
}

.model-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.model-card-series {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Checkmark per modello selezionato */
.model-card::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.model-card.selected::after {
  opacity: 1;
  transform: scale(1);
}

/* Messaggio nessun risultato */
.no-results-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 16px;
  display: none;
}

.no-results-message.visible {
  display: block;
}

.no-results-icon {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ============================================
   REPAIR OPTIONS - CONTINUA COME PRIMA
   ============================================ */

.repair-options-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.repair-card-horizontal {
  background: var(--card-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.repair-card-horizontal:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.repair-card-horizontal.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.05) 0%, 
    rgba(230, 126, 34, 0.08) 100%);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1),
              var(--shadow-md);
}

.repair-card-horizontal .repair-checkbox {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--card-bg);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.repair-card-horizontal.selected .repair-checkbox {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.repair-card-horizontal .repair-checkbox::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.repair-card-horizontal.selected .repair-checkbox::after {
  opacity: 1;
  transform: scale(1);
}

.repair-icon-horizontal {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.1) 0%, 
    rgba(230, 126, 34, 0.15) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary-color);
  margin-bottom: 16px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

.repair-card-horizontal:hover .repair-icon-horizontal {
  transform: scale(1.05) rotate(-3deg);
}

.repair-card-horizontal.selected .repair-icon-horizontal {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
}

.repair-title-horizontal {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.repair-desc-horizontal {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.repair-price-horizontal {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

/* ============================================
   OPTION CARDS (usate dallo script.js)
   ============================================ */

.option-card-horizontal {
  background: var(--card-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.option-card-horizontal:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.option-card-horizontal.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.05) 0%, 
    rgba(230, 126, 34, 0.08) 100%);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1),
              var(--shadow-md);
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: var(--primary-color);
  margin: 0;
}

.checkbox-label {
  display: none;
}

.option-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.1) 0%, 
    rgba(230, 126, 34, 0.15) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary-color);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

.option-card-horizontal:hover .option-icon {
  transform: scale(1.05) rotate(-3deg);
}

.option-card-horizontal.selected .option-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
}

.option-info-horizontal {
  flex: 1;
}

.option-info-horizontal h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.option-info-horizontal p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.option-price-horizontal {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  text-align: right;
}

/* Continua nella parte 2... */
/* ============================================
   LOCATION OPTIONS
   ============================================ */

.location-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.location-card {
  background: var(--card-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.location-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.location-card.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.05) 0%, 
    rgba(230, 126, 34, 0.08) 100%);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1),
              var(--shadow-md);
}

.location-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.1) 0%, 
    rgba(230, 126, 34, 0.15) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 12px;
  transition: var(--transition);
}

.location-card.selected .location-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.location-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.location-address,
.location-city,
.location-phone {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-address i,
.location-city i,
.location-phone i {
  color: var(--primary-color);
  width: 16px;
}

/* ============================================
   CALENDAR
   ============================================ */

.calendar-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.calendar-header {
  margin-bottom: 20px;
}

.calendar-month-year {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-nav-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--background-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.calendar-nav-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

.calendar-nav-btn:active {
  transform: scale(0.95);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--background-light);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.calendar-day.selected {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.2),
              var(--shadow-md);
}

.calendar-day.today:not(.selected) {
  border-color: var(--primary-color);
  font-weight: 700;
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.calendar-day.other-month {
  opacity: 0.3;
}

.calendar-notice {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
  font-weight: 500;
}

/* ============================================
   TIME SLOTS
   ============================================ */

.time-slots-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.time-slots-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
  letter-spacing: -0.3px;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.time-slot-btn {
  padding: 14px 8px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  text-align: center;
}

.time-slot-btn:hover:not(.disabled) {
  border-color: var(--primary-color);
  background: rgba(243, 156, 18, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.time-slot-btn.selected {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.time-slot-btn.disabled {
  background: var(--background-light);
  color: var(--text-light);
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--border-light);
}

/* ============================================
   FORM INPUTS
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--primary-color);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1),
              var(--shadow-md);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   PRIVACY CHECKBOX
   ============================================ */

.privacy-group {
  margin: 28px 0;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.privacy-checkbox {
  position: absolute;
  opacity: 0;
}

.privacy-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.checkbox-custom {
  position: relative;
  min-width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  transition: var(--transition);
  margin-top: 2px;
  flex-shrink: 0;
}

.privacy-checkbox:checked + .privacy-label .checkbox-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-color: var(--primary-color);
}

.privacy-checkbox:checked + .privacy-label .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.privacy-text {
  flex: 1;
  color: var(--text-secondary);
}

.privacy-icon {
  color: var(--primary-color);
  font-size: 16px;
  margin-right: 4px;
}

.privacy-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

.privacy-link:hover {
  border-bottom-color: var(--primary-color);
  color: var(--primary-dark);
}

/* ============================================
   SUMMARY
   ============================================ */

.summary-container {
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.summary-item:last-of-type {
  border-bottom: none;
}

.summary-item > div:first-child {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 15px;
}

.summary-item > div:last-child {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  font-size: 15px;
}

.total-price {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 3px solid var(--primary-color);
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-container {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  position: sticky;
  bottom: max(env(safe-area-inset-bottom, 16px), 16px);
  z-index: 100;
}

.btn {
  flex: 1;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  min-height: 56px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color), #5a6268);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #218838);
}

/* ============================================
   INFO BOXES
   ============================================ */

.info-boxes-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.info-box-horizontal {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.info-box-horizontal:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.info-icon-horizontal {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: linear-gradient(135deg, 
    rgba(243, 156, 18, 0.1) 0%, 
    rgba(230, 126, 34, 0.15) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-color);
  margin-top: 2px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
  flex-shrink: 0;
}

.info-box-horizontal:hover .info-icon-horizontal {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  transform: scale(1.05) rotate(-5deg);
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
}

.info-content-horizontal h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-content-horizontal p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-content {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 90vw;
}

.loading-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-content h3 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
}

.loading-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* ============================================
   RESPONSIVE - MOBILE OPTIMIZED
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .repair-body {
    padding: 16px;
  }

  .steps {
    margin: 0 -8px 20px -8px;
    padding: 16px 12px;
  }

  .steps::before {
    left: 30px;
    right: 30px;
  }

  .repair-options-horizontal,
  .location-options {
    grid-template-columns: 1fr;
  }

  .model-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .time-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .btn-container {
    flex-direction: column;
  }

  .info-boxes-horizontal {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    font-size: 15px;
  }

  .header-top {
    padding: max(env(safe-area-inset-top, 12px) + 8px, 20px) 16px 16px;
  }

  .header-logo {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .header-text h1 {
    font-size: 20px;
  }

  .header-text p {
    font-size: 13px;
  }

  .header-stats {
    padding: 12px 16px;
    gap: 8px;
  }

  .stat-item {
    padding: 10px 6px;
  }

  .stat-icon {
    font-size: 22px;
  }

  .stat-value {
    font-size: 16px;
  }

  .stat-label {
    font-size: 10px;
  }

  .repair-body {
    padding: 12px;
  }

  .form-step h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .model-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .model-card {
    padding: 16px 12px;
  }

  .model-card-icon {
    font-size: 40px;
    margin-bottom: 8px;
  }

  .model-card-name {
    font-size: 14px;
  }

  .model-card-series {
    font-size: 11px;
  }

  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .time-slot-btn {
    padding: 12px 6px;
    font-size: 14px;
  }

  .calendar-wrapper {
    padding: 16px;
  }

  .calendar-month-year {
    font-size: 20px;
  }

  .calendar-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .weekday {
    font-size: 11px;
    padding: 6px 0;
  }

  .calendar-day {
    font-size: 14px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 16px;
    min-height: 52px;
  }

  .loader-icon {
    font-size: 70px;
  }

  .loader-title {
    font-size: 24px;
  }

  .loader-subtitle {
    font-size: 15px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .model-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .repair-card-horizontal {
    padding: 16px;
  }

  .option-card-horizontal {
    padding: 16px;
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .option-price-horizontal {
    grid-column: 2;
    text-align: left;
    font-size: 20px;
  }

  .repair-icon-horizontal,
  .option-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .location-card {
    padding: 16px;
  }

  .location-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .header-top {
    padding: 12px 16px;
  }

  .header-logo {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .header-text h1 {
    font-size: 18px;
  }

  .header-text p {
    font-size: 12px;
  }

  .header-stats {
    padding: 10px 16px;
  }

  .stat-item {
    padding: 8px 6px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  #initial-loader,
  .repair-header,
  .steps,
  .btn-container,
  #loading-overlay,
  #toast-container {
    display: none !important;
  }

  body {
    background: white;
  }

  .repair-body {
    padding: 0;
  }

  .summary-container {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }

  .model-card,
  .repair-card-horizontal,
  .location-card,
  .calendar-wrapper,
  .time-slots-section {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible per tastiera */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --border-light: #333333;
  }

  .model-card,
  .repair-card-horizontal,
  .location-card,
  .time-slot-btn {
    border-width: 3px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ============================================
   SCROLL OPTIMIZATION
   ============================================ */

* {
  -webkit-overflow-scrolling: touch;
}

.repair-body {
  scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.steps::-webkit-scrollbar {
  height: 4px;
}

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

.steps::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.steps::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
