/* ========== 🍪 COOKIE BANNER ========== */
.cookie-consent {
  position: fixed;
  bottom: 25px;
  right: 25px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  padding: 20px 22px;
  background: #fff;
  color: #333;
  z-index: 9999;
  font-family: "Inter", sans-serif;
  max-width: 420px;
   transform: translateY(120%);
  opacity: 0;
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.cookie-consent.show {
  transform: translateY(0);
  opacity: 1;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-content svg {
  flex-shrink: 0;
  animation: spinCookie 6s linear infinite;
}
@keyframes spinCookie {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Buttons */
.btn-accept,
.btn-reject,
.btn-settings {
  display: inline-block;
  width: 32%;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 8px 14px;
  border: none;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-accept {
  background: #4CAF50;
  color: #fff;
}
.btn-accept:hover {
  background: #45a049;
}

.btn-reject {
  background: #f44336;
  color: #fff;
}
.btn-reject:hover {
  background: #d7352b;
}

.btn-settings {
  background: #e0e0e0;
  color: #333;
}
.btn-settings:hover {
  background: #d5d5d5;
}

/* ========== ⚙️ MODAL OVERLAY ========== */
.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.cookie-modal-content {
  background: #fff;
  border-radius: 16px;
  width: 520px;
  max-width: 92%;
  padding: 25px;
  position: relative;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  font-family: "Inter", sans-serif;
}

/* Close Button */
.cookie-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 26px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}
.cookie-close:hover { color: #000; }

/* Categorie */
.cookie-category-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.cookie-category-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px 16px;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.cookie-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.cookie-category-card h6 {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: #0d6efd;
}
.cookie-category-card small {
  display: block;
  font-size: 12px;
  color: #555;
}

/* Switch */
.cookie-category-card .form-check-input {
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.form-check-input:checked {
  background-color: #28a745;
  border-color: #28a745;
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Footer Buttons */
.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.cookie-btn.accept {
  background: #0d6efd;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.cookie-btn.accept:hover {
  background: #0056b3;
}
.cookie-btn.accept-all {
  background: #6c757d;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.cookie-btn.accept-all:hover {
  background: #5a6268;
}

/* Animazione modal */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ========== 🌙 DARK MODE ========== */
@media (prefers-color-scheme: dark) {
  .cookie-consent {
    background: rgba(30,30,30,0.95);
    color: #f1f1f1;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }
  .cookie-modal-content {
    background: #1e1e1e;
    color: #f1f1f1;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  }
  .cookie-category-card {
    background: #2a2a2a;
  }
  .cookie-category-card small {
    color: #ccc;
  }
  .btn-settings {
    background: #444;
    color: #ddd;
  }
  .btn-settings:hover {
    background: #555;
  }
}
