/* ═══════════════════════════════════════════════════════════
   Descomplica Débito — Consentimento de Cookies (LGPD)
   ═══════════════════════════════════════════════════════════ */

/* ── Banner ───────────────────────────────────────────────── */
#dd-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 140%);
  width: min(960px, calc(100% - 2rem));
  z-index: 3000;
  background: rgba(8, 15, 26, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(249, 115, 22, 0.15);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, visibility 0s linear 0.55s;
  font-family: 'Inter', system-ui, sans-serif;
}

#dd-cookie-banner.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

#dd-cookie-banner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 1.25rem 1.25rem 0 0;
  background: linear-gradient(90deg, #FF3D00, #F97316, #FF9100);
}

.dd-cookie-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #FF3D00, #F97316);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.4);
}

.dd-cookie-icon img { width: 26px; height: auto; display: block; }

.dd-cookie-text { flex: 1; min-width: 0; }

.dd-cookie-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: #fff;
}

.dd-cookie-text p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

.dd-cookie-text a {
  color: #FB923C;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dd-cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 190px;
}

.dd-btn {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.75rem 1.1rem;
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.dd-btn:focus-visible { outline: 2px solid #FB923C; outline-offset: 2px; }
.dd-btn:hover { transform: translateY(-1px); }

.dd-btn-accept {
  background: linear-gradient(135deg, #FF5A1F, #F97316);
  color: #fff;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.4);
}
.dd-btn-accept:hover { box-shadow: 0 10px 24px rgba(249, 115, 22, 0.55); }

.dd-btn-necessary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}
.dd-btn-necessary:hover { background: rgba(255, 255, 255, 0.14); }

.dd-btn-reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}
.dd-btn-reject:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* ── Botão flutuante para reabrir preferências ───────────── */
#dd-cookie-reopen {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 2500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(8, 15, 26, 0.92);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
#dd-cookie-reopen { transition: transform 0.25s ease, border-color 0.25s ease, bottom 0.4s ease; }
#dd-cookie-reopen.show { display: flex; }
body.has-sticky-cta #dd-cookie-reopen { bottom: calc(var(--sticky-bar-offset, 84px) + 1rem); }
body.has-sticky-cta #dd-cookie-banner { bottom: calc(var(--sticky-bar-offset, 84px) + 0.75rem); }
#dd-cookie-reopen:hover { transform: scale(1.1) rotate(-8deg); border-color: #F97316; }
#dd-cookie-reopen:focus-visible { outline: 2px solid #FB923C; outline-offset: 2px; }

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 760px) {
  #dd-cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    bottom: 0.75rem;
    padding: 1.1rem 1.1rem 1rem;
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
  }
  .dd-cookie-icon { display: none; }
  .dd-cookie-actions { min-width: 0; }
  .dd-cookie-actions .dd-btn { padding: 0.85rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  #dd-cookie-banner, .dd-btn, #dd-cookie-reopen { transition: none; }
}
