/* =========================
   PRIVACY & TERMS MODAL
========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  margin: 2rem;
  padding: 0;
  border-radius: 1.5rem;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 2rem;
  background: linear-gradient(135deg, #7C3AED 0%, #5b21b6 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-body h3 {
  color: #7C3AED;
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.modal-body p, .modal-body li {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.modal-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Checkbox custom */
.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.75rem;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.checkbox-container:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  cursor: pointer;
  accent-color: #7C3AED;
  margin-top: 2px;
}

.checkbox-container label {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 400;
}

.checkbox-container a {
  color: rgba(124, 58, 237, 0.9);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
}

.checkbox-container a:hover {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
}

/* Variante per pack Smart AI (sfondo viola) */
.bg-gradient-to-br .checkbox-container label {
  color: rgba(255, 255, 255, 0.85);
}

.bg-gradient-to-br .checkbox-container a {
  color: #FCD34D;
  border-bottom-color: rgba(252, 211, 77, 0.4);
}

.bg-gradient-to-br .checkbox-container a:hover {
  color: #FDE047;
  border-bottom-color: #FDE047;
}

/* Button disabled state */
.btn-primary:disabled,
.btn-primary.disabled,
button:disabled,
button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(50%);
  transform: none !important;
}

.btn-primary:disabled:hover,
.btn-primary.disabled:hover,
button:disabled:hover,
button.disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(50%);
}

/* Button enabled dopo checkbox */
button:not(:disabled) {
  transition: all 0.3s ease;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}