/* ==============================================
   ULTRACOMP — Cookie Banner + Notifications
   Optimized for PageSpeed (combined file)
   ============================================== */

/* ---------- COOKIE BANNER ---------- */

.siteCookies {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: 600px !important;
  width: calc(100% - 40px) !important;
  z-index: 9999 !important;
  animation: cookieSlideUp 0.5s ease-out forwards !important;
}

.siteCookies__form {
  background: rgba(88, 28, 135, 0.85) !important;
  border: 1px solid rgba(147, 51, 234, 0.6) !important;
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  margin: 0 !important;
  display: flex !important;
  gap: 20px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.siteCookies__content {
  flex: 1 !important;
  min-width: 280px !important;
}

.siteCookies__text {
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #fff !important;
  margin-bottom: 8px !important;
}

.siteCookies__text a {
  color: #c084fc !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(192, 132, 252, 0.3) !important;
  transition: color 0.2s ease !important;
}

.siteCookies__text a:hover {
  color: #e879f9 !important;
  border-bottom-color: rgba(232, 121, 249, 0.6) !important;
}

.siteCookies__links {
  margin: 0 !important;
  padding: 0 !important;
}

.siteCookies__link {
  color: #c084fc !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  opacity: 0.9 !important;
  transition: color 0.2s ease !important;
}

.siteCookies__link:hover {
  color: #e879f9 !important;
  opacity: 1 !important;
}

.siteCookies__buttonWrap {
  display: flex !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

.siteCookies__button {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.5), rgba(88, 28, 135, 0.5)) !important;
  border: 1px solid rgba(147, 51, 234, 0.8) !important;
  box-shadow: 0 0 8px rgba(147, 51, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
  outline: none !important;
}

.siteCookies__button:hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(88, 28, 135, 0.7)) !important;
  border-color: rgba(147, 51, 234, 1) !important;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
}

.siteCookies__button:active {
  transform: translateY(0) !important;
}

/* Scrolled state */
.siteCookies--scrolled .siteCookies__form {
  border-color: rgba(147, 51, 234, 0.8) !important;
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Hide animation */
.siteCookies.hiding {
  animation: cookieSlideDown 0.3s ease-in forwards !important;
}

@keyframes cookieSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(100%); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes cookieSlideDown {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(100%); }
}

/* ---------- COOKIE DIALOG CLOSE BUTTON ---------- */
/* Replaces the entire close-button JS file */

#cboxClose {
  background: rgba(147, 51, 234, 0.8) !important;
  border: 1px solid rgba(147, 51, 234, 0.8) !important;
  border-radius: 50% !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(147, 51, 234, 0.3) !important;
  cursor: pointer !important;
  font-weight: bold !important;
  font-size: 16px !important;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

#cboxClose:hover {
  background: rgba(147, 51, 234, 1) !important;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.5) !important;
  transform: scale(1.05) !important;
}

/* ---------- NOTIFICATIONS ---------- */

.msg.msg-success[data-testid="notifierMessage"] {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 16px auto !important;
  max-width: 400px !important;
  position: fixed !important;
  top: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  /* Fix: match child border-radius + clip the blur */
  border-radius: 12px !important;
  overflow: hidden !important;
  animation: notifSlideDown 0.4s ease-out forwards !important;
}

.msg.msg-success[data-testid="notifierMessage"] .container {
  background: rgba(88, 28, 135, 0.85) !important;
  border: 2px solid rgba(147, 51, 234, 0.7) !important;
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #fff !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.msg.msg-success[data-testid="notifierMessage"] a {
  color: #c084fc !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color 0.2s ease !important;
}

.msg.msg-success[data-testid="notifierMessage"] a:hover {
  color: #e879f9 !important;
}

.msg.msg-success[data-testid="notifierMessage"]:hover .container {
  border-color: rgba(147, 51, 234, 0.8) !important;
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.msg.msg-success[data-testid="notifierMessage"].hiding {
  animation: notifSlideUp 0.3s ease-in forwards !important;
}

@keyframes notifSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-100%); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes notifSlideUp {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-100%); }
}

/* ---------- DESKTOP: GLASS EFFECT ---------- */
/* backdrop-filter only on desktop where GPU can handle it */

@media (min-width: 769px) {
  .siteCookies__form {
    background: rgba(88, 28, 135, 0.4) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
  }

  .siteCookies__button {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .msg.msg-success[data-testid="notifierMessage"] .container {
    background: rgba(88, 28, 135, 0.4) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
  }
}

/* ---------- MOBILE ---------- */

@media (max-width: 768px) {
  .siteCookies {
    bottom: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: none !important;
  }

  .siteCookies__form {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 20px !important;
  }

  .siteCookies__content {
    min-width: auto !important;
  }

  .siteCookies__text {
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }

  .siteCookies__buttonWrap {
    justify-content: center !important;
  }

  .siteCookies__button {
    padding: 14px 28px !important;
    font-size: 15px !important;
    min-width: 120px !important;
  }
}

@media (max-width: 480px) {
  .siteCookies__form {
    padding: 16px !important;
  }

  .siteCookies__text {
    font-size: 12px !important;
  }

  .siteCookies__button {
    width: 100% !important;
    padding: 16px !important;
  }

  .msg.msg-success[data-testid="notifierMessage"] {
    max-width: calc(100% - 32px) !important;
    margin: 0 !important;
  }

  .msg.msg-success[data-testid="notifierMessage"] .container {
    padding: 14px 16px !important;
    font-size: 13px !important;
  }
}
