/* =========================================================
   Cookie banner (LGPD) — layout.
   Os visuais dos .cookie-banner__button já vêm do lp.css;
   aqui está o posicionamento do card, o modal e o FAB.
   ========================================================= */

@keyframes slideUpLgpd {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes cookieSlideDown {
  from { transform: translateY(-60px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---- Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: 90%;
  max-width: 550px;
  background: #fff;
  border: 1px solid hsl(0 0% 88%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: slideUpLgpd 0.4s ease forwards;
  font-family: 'Montserrat', system-ui, sans-serif;
}
@media (min-width: 768px) {
  .cookie-banner { max-width: 650px; padding: 1.75rem 2rem; }
}
.cookie-banner__text {
  color: hsl(0 0% 10%);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
}
.cookie-banner__button {
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
}
@media (max-width: 480px) {
  .cookie-banner__actions { flex-direction: column; }
  .cookie-banner__button { width: 100%; }
}

/* ---- FAB (botão flutuante pós-decisão) ---- */
.cookie-fab {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9999;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: hsl(38 45% 42%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cookie-fab:hover { transform: scale(1.1); background: hsl(38 50% 48%); }
.cookie-fab svg { width: 1.25rem; height: 1.25rem; }

/* ---- Modal ---- */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  font-family: 'Montserrat', system-ui, sans-serif;
}
.cookie-modal__panel {
  background: #fff;
  border-radius: 1.5rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.24);
  animation: cookieSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) { .cookie-modal__head { padding: 2rem; } }
.cookie-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(0 0% 10%);
  margin: 0;
}
@media (min-width: 768px) { .cookie-modal__title { font-size: 1.25rem; } }
.cookie-modal__close {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: hsl(0 0% 45%);
  transition: all 0.3s ease;
}
.cookie-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: hsl(0 0% 10%);
  transform: rotate(90deg);
}
.cookie-modal__close svg { width: 1.25rem; height: 1.25rem; }
.cookie-modal__body { padding: 1.25rem; }
@media (min-width: 768px) { .cookie-modal__body { padding: 2rem; } }
.cookie-modal__intro {
  font-size: 0.75rem;
  color: hsl(0 0% 45%);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
@media (min-width: 768px) { .cookie-modal__intro { font-size: 0.875rem; } }

.cookie-cat {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}
.cookie-cat:last-of-type { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.cookie-cat__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.cookie-cat__head input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: hsl(38 45% 42%);
  cursor: pointer;
  flex: 0 0 auto;
}
.cookie-cat__head input:disabled { opacity: 0.6; cursor: default; }
.cookie-cat__label {
  font-weight: 600;
  color: hsl(0 0% 10%);
  font-size: 0.875rem;
}
@media (min-width: 768px) { .cookie-cat__label { font-size: 1rem; } }
.cookie-cat__desc {
  color: hsl(0 0% 45%);
  font-size: 0.75rem;
  line-height: 1.6;
  margin: 0 0 0 2rem;
}
@media (min-width: 768px) { .cookie-cat__desc { font-size: 0.875rem; } }
.cookie-cat__ret {
  font-size: 0.6875rem;
  color: hsl(0 0% 45%);
  margin: 0.25rem 0 0 2rem;
}
@media (min-width: 768px) { .cookie-cat__ret { font-size: 0.75rem; } }
.cookie-cat__ret span { font-weight: 500; }

.cookie-modal__controller {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.75rem;
  color: hsl(0 0% 45%);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cookie-modal__controller p { margin: 0; }
.cookie-modal__controller-title { font-weight: 600; color: hsl(0 0% 20%); }
.cookie-modal__controller a {
  color: hsl(38 45% 42%) !important;
  font-weight: 500;
}
.cookie-modal__controller a:hover { text-decoration: underline !important; }

.cookie-modal__foot {
  padding: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 768px) { .cookie-modal__foot { padding: 2rem; } }
.cookie-modal__save {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, hsl(38 45% 42%), hsl(38 55% 52%));
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (min-width: 768px) { .cookie-modal__save { font-size: 1rem; } }
.cookie-modal__save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(38 45% 42% / 0.4);
}
.cookie-modal__foot-row { display: flex; gap: 0.75rem; }
@media (max-width: 480px) { .cookie-modal__foot-row { flex-direction: column; } }
.cookie-modal__accept {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(38 45% 42%);
  color: hsl(38 45% 42%);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.cookie-modal__accept:hover { background: hsl(38 45% 42%); color: #fff; }
.cookie-modal__reject {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(0 0% 80%);
  color: hsl(0 0% 30%);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.cookie-modal__reject:hover { background: hsl(0 0% 95%); }
.cookie-modal__revoke {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: hsl(0 0% 45%);
  text-decoration: underline;
  transition: color 0.2s ease;
}
.cookie-modal__revoke:hover { color: hsl(0 0% 20%); }
