/* ============================================
   Cookie Consent Banner — Arcano Zero
   GDPR compliant, Garante Linee Guida 2021
   ============================================ */

/* Overlay */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cookie-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 9999;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.12);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 40px;
}

/* Main banner content */
.cookie-banner-main {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.cookie-banner-text {
  flex: 1;
}

.cookie-banner-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #0a0a0a;
}

.cookie-banner-text p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
  margin: 0;
  max-width: none;
}

.cookie-banner-text a {
  color: #0a0a0a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-text a:hover {
  color: #666;
}

/* Buttons */
.cookie-banner-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 50px;
  border: 2px solid #0a0a0a;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #0a0a0a;
  color: #fff;
}

.cookie-btn-accept:hover {
  background: #333;
  border-color: #333;
}

.cookie-btn-reject {
  background: transparent;
  color: #0a0a0a;
}

.cookie-btn-reject:hover {
  background: #f0f0f0;
}

.cookie-btn-settings {
  background: transparent;
  color: #0a0a0a;
  border-color: transparent;
  padding: 12px 16px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-btn-settings:hover {
  color: #666;
}

/* Settings panel */
.cookie-settings {
  display: none;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
}

.cookie-settings.visible {
  display: block;
}

.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-info h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #0a0a0a;
}

.cookie-category-info p {
  font-size: 0.82rem;
  color: #888;
  margin: 0;
  max-width: 600px;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-left: 20px;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ddd;
  border-radius: 26px;
  transition: 0.25s;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #0a0a0a;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background: #bbb;
  cursor: not-allowed;
}

.cookie-toggle input:disabled:checked + .cookie-toggle-slider {
  background: #888;
}

/* Save preferences button */
.cookie-settings-save {
  margin-top: 20px;
  text-align: right;
}

/* Footer "Gestisci cookie" link */
.cookie-manage-link {
  cursor: pointer;
  transition: color 0.3s ease;
}

.cookie-manage-link:hover {
  color: #fff !important;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-banner-inner {
    padding: 24px;
  }

  .cookie-banner-main {
    flex-direction: column;
    gap: 20px;
  }

  .cookie-banner-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .cookie-btn-accept,
  .cookie-btn-reject {
    flex: 1;
    text-align: center;
  }

  .cookie-btn-settings {
    width: 100%;
    text-align: center;
  }

  .cookie-category {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-toggle {
    margin-left: 0;
  }
}
