/* ============================================
   COOKIE BANNER (isolated stylesheet)
   - UI consenso cookie senza toccare style.css
   - Naming: .cookie-consent* per evitare collisioni
   ============================================ */

/* Hidden state (use [hidden] or .is-hidden in JS) */
.cookie-consent[hidden],
.cookie-consent.is-hidden {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1300; /* sopra sticky booking (1200), sotto legal modal (2000) */

  display: flex;
  justify-content: center;

  pointer-events: none; /* allow clicks only inside card */
}

/* On mobile the site has a sticky booking bar at the bottom.
   Place cookie banner above it to avoid overlap. */
@media (max-width: 768px) {
  .cookie-consent {
    bottom: 96px;
  }
}

.cookie-consent__card {
  pointer-events: auto;

  /* Compact, premium card */
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg, 22px);
  box-shadow: var(--shadow-lg, 0 22px 70px rgba(61,40,23,0.18));
  backdrop-filter: blur(10px);

  padding: 14px 16px;
  display: grid;
  gap: 10px;

  animation: cookieConsentIn 220ms ease-out;
}

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

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__card {
    animation: none;
  }
}

.cookie-consent__title {
  margin: 0;
  font-family: var(--font-serif, serif);
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.2px;
  color: var(--primary-dark, #3d2817);
  font-weight: 900;
}

.cookie-consent__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-light, #666);
}

.cookie-consent__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-consent__links a {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-rose, #c87a8f);
  text-decoration: none;
}

.cookie-consent__links a:hover {
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-consent__btn {
  appearance: none;
  border: 0;
  cursor: pointer;

  border-radius: 14px;
  padding: 10px 12px;

  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2px;

  transition: var(--transition, all 0.3s ease-in-out);
}

.cookie-consent__btn:active {
  transform: translateY(1px);
}

.cookie-consent__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(200, 122, 143, 0.22);
}

/* Primary (Accept) */
.cookie-consent__btn--primary {
  background: var(--accent-rose, #c87a8f);
  color: #fff;
  box-shadow: 0 10px 22px rgba(200, 122, 143, 0.20);
}

.cookie-consent__btn--primary:hover {
  transform: translateY(-1px);
  background: #b06a7f;
  box-shadow: 0 14px 28px rgba(200, 122, 143, 0.26);
}

/* Secondary (legacy / if ever used) */
.cookie-consent__btn--secondary {
  background: rgba(200, 122, 143, 0.10);
  border: 1px solid rgba(200, 122, 143, 0.28);
  color: var(--primary-dark, #3d2817);
}

.cookie-consent__btn--secondary:hover {
  transform: translateY(-1px);
  background: rgba(200, 122, 143, 0.16);
  box-shadow: 0 12px 26px rgba(61,40,23,0.10);
}

/* Ghost (Reject) */
.cookie-consent__btn--ghost {
  background: rgba(200, 122, 143, 0.10);
  border: 1px solid rgba(200, 122, 143, 0.28);
  color: var(--primary-dark, #3d2817);
}

.cookie-consent__btn--ghost:hover {
  transform: translateY(-1px);
  background: rgba(200, 122, 143, 0.16);
  box-shadow: 0 12px 26px rgba(61,40,23,0.10);
}

/* Extra-small: stack buttons full width */
@media (max-width: 420px) {
  .cookie-consent__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__btn {
    width: 100%;
  }
}
