/* ============================================
   Guia Canindé — Estilos do Consentimento de Cookies
   ============================================ */

/* ---------- Banner Principal ---------- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 16px 16px;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-banner.cookie-banner-show  { transform: translateY(0); }
#cookie-banner.cookie-banner-hide  { transform: translateY(110%); }

.cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
}

.cookie-banner-icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
}

.cookie-banner-content {
  flex: 1;
  min-width: 240px;
  color: #e2e8f0;
}

.cookie-banner-content strong {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 4px;
}

.cookie-banner-content p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 4px;
  line-height: 1.6;
}

.cookie-banner-links { font-size: 12px !important; }
.cookie-banner-links a { color: #3b82f6; text-decoration: none; }
.cookie-banner-links a:hover { text-decoration: underline; }

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* ---------- Botões ---------- */
.cookie-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}

.cookie-btn-primary {
  background: #2563eb;
  color: #fff;
}
.cookie-btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }

.cookie-btn-outline {
  background: transparent;
  color: #93c5fd;
  border: 1.5px solid #3b82f6;
}
.cookie-btn-outline:hover { background: rgba(59,130,246,.12); }

.cookie-btn-ghost {
  background: transparent;
  color: #64748b;
}
.cookie-btn-ghost:hover { color: #94a3b8; background: rgba(255,255,255,.05); }

/* ---------- Modal ---------- */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#cookie-modal.cookie-modal-show { opacity: 1; }

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.cookie-modal-box {
  position: relative;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

#cookie-modal.cookie-modal-show .cookie-modal-box { transform: translateY(0); }

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.cookie-modal-close {
  background: rgba(255,255,255,.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}
.cookie-modal-close:hover { background: rgba(255,255,255,.15); color: #fff; }

.cookie-modal-body {
  padding: 20px 24px;
  color: #e2e8f0;
}

.cookie-modal-body > p {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.6;
}

.cookie-categoria {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.cookie-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-cat-header strong {
  font-size: 14px;
  color: #fff;
  display: block;
  margin-bottom: 3px;
}

.cookie-cat-header p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.cookie-toggle-disabled {
  font-size: 11px;
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(34,197,94,.1);
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* Toggle switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-switch-slider {
  position: absolute;
  inset: 0;
  background: #334155;
  border-radius: 24px;
  transition: 0.3s;
}

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

.cookie-switch input:checked + .cookie-switch-slider { background: #2563eb; }
.cookie-switch input:checked + .cookie-switch-slider::before { transform: translateX(20px); }

.cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Toast ---------- */
#cookie-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #22c55e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  z-index: 10001;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(34,197,94,.35);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  opacity: 0;
}

#cookie-toast.cookie-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------- Botão flutuante ---------- */
#cookie-manage-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 42px;
  height: 42px;
  background: rgba(30,41,59,.9);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

#cookie-manage-btn:hover {
  transform: scale(1.1);
  background: #1e293b;
  border-color: rgba(255,255,255,.2);
}

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; padding: 16px; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; padding: 10px 12px; }
  .cookie-modal-footer { flex-direction: column; align-items: stretch; }
  .cookie-modal-footer .d-flex { flex-direction: column; }
  .cookie-modal-footer .cookie-btn { text-align: center; }
  #cookie-manage-btn { bottom: 80px; }
}
