/* ========== VADEMECUM CONTESTUALE + ONBOARDING STYLES ========== */

/* FAB Help Button */
.fab-help-button {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F16926 0%, #FF8C42 100%);
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(241, 105, 38, 0.4);
  z-index: 9998;
  transition: all 0.3s ease;
  animation: pulse-help 2s infinite;
}

.fab-help-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(241, 105, 38, 0.6);
}

@keyframes pulse-help {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(241, 105, 38, 0.6); }
}

/* Vademecum Modal */
.vademecum-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.vademecum-modal.show {
  opacity: 1;
  pointer-events: all;
}

.vademecum-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.vademecum-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
  border-radius: 25px;
  border: 2px solid rgba(241, 105, 38, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.vademecum-modal.show .vademecum-container {
  transform: scale(1);
}

.vademecum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  background: linear-gradient(135deg, #F16926 0%, #FF8C42 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.vademecum-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.vademecum-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vademecum-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.vademecum-body {
  padding: 30px;
  max-height: calc(85vh - 220px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #F16926 rgba(255, 255, 255, 0.1);
}

.vademecum-body::-webkit-scrollbar {
  width: 8px;
}

.vademecum-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.vademecum-body::-webkit-scrollbar-thumb {
  background: #F16926;
  border-radius: 10px;
}

.vademecum-section {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #F16926;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.vademecum-section:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #FF8C42;
  transform: translateX(5px);
}

.vademecum-section h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  font-weight: 600;
  color: #F16926;
}

.vademecum-section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.vademecum-section b {
  color: #FF8C42;
}

.ask-coach-inline {
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ask-coach-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

.vademecum-footer {
  padding: 20px 30px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-coach, .btn-onboarding {
  padding: 15px 30px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  max-width: 300px;
}

.btn-coach {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
}

.btn-coach:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4);
}

.btn-onboarding {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: white;
}

.btn-onboarding:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* ========== ONBOARDING TOUR ========== */

.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  pointer-events: auto;
}

.onboarding-spotlight {
  position: absolute;
  border: 3px solid #F16926;
  border-radius: 15px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 40px rgba(241, 105, 38, 0.6);
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 10000;
}

.onboarding-tooltip {
  position: absolute;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
  border: 2px solid #F16926;
  border-radius: 20px;
  padding: 25px;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  animation: tooltip-appear 0.4s ease;
}

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

.onboarding-tooltip h3 {
  margin: 0 0 15px 0;
  font-size: 22px;
  font-weight: 700;
  color: #F16926;
}

.onboarding-tooltip p {
  margin: 0 0 20px 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.onboarding-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.onboarding-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.onboarding-progress-dot.active {
  background: #F16926;
  transform: scale(1.3);
}

.onboarding-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.onboarding-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.onboarding-btn-skip {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.onboarding-btn-skip:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.onboarding-btn-next {
  background: linear-gradient(135deg, #F16926 0%, #FF8C42 100%);
  color: white;
}

.onboarding-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(241, 105, 38, 0.4);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
  .fab-help-button {
    width: 50px;
    height: 50px;
    bottom: 80px;
    right: 20px;
    font-size: 24px;
  }
  
  .vademecum-container {
    width: 95%;
    max-height: 90vh;
    border-radius: 20px;
  }
  
  .vademecum-header h2 {
    font-size: 20px;
  }
  
  .vademecum-body {
    padding: 20px;
  }
  
  .vademecum-section {
    padding: 15px;
  }
  
  .vademecum-section h3 {
    font-size: 18px;
  }
  
  .vademecum-section p {
    font-size: 14px;
  }
  
  .vademecum-footer {
    flex-direction: column;
  }
  
  .btn-coach, .btn-onboarding {
    max-width: 100%;
  }
  
  .onboarding-tooltip {
    max-width: 90vw;
    padding: 20px;
  }
}
