/* ── Cookie Banner ── */
@keyframes cookieBannerSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cb-overlay {
  position: fixed;
  inset: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cb-card {
  pointer-events: auto;
  max-width: 56rem;
  width: 100%;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  animation: cookieBannerSlideUp .5s ease-out;
}

.cb-inner {
  padding: 1.25rem 1.5rem;
}

.cb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cb-title {
  font-size: .875rem;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.cb-desc {
  margin-top: .375rem;
  font-size: .875rem;
  line-height: 1.6;
  color: #6b7280;
}

.cb-desc a {
  color: #00d4ff;
  text-decoration: none;
}
.cb-desc a:hover {
  text-decoration: underline;
}

/* Close button */
.cb-close {
  flex-shrink: 0;
  background: none;
  border: none;
  border-radius: .5rem;
  padding: .375rem;
  color: #9ca3af;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cb-close:hover {
  background: #f3f4f6;
  color: #111;
}
.cb-close svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

/* Preference toggles */
.cb-prefs {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.cb-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: .75rem;
  background: #f9fafb;
  padding: .75rem;
}

.cb-toggle-label {
  font-size: .875rem;
  color: #6b7280;
}

.cb-switch {
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
  align-items: center;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  background: #d1d5db;
  padding: 0;
}
.cb-switch[aria-checked="true"] {
  background: #00d4ff;
}
.cb-switch[disabled] {
  cursor: not-allowed;
  opacity: .6;
}
.cb-switch-knob {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #fff;
  transition: transform .2s;
  transform: translateX(.25rem);
}
.cb-switch[aria-checked="true"] .cb-switch-knob {
  transform: translateX(1.5rem);
}

/* Action buttons */
.cb-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.cb-btn {
  border: none;
  border-radius: .75rem;
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
  text-align: center;
}

.cb-btn-accept {
  background: #00d4ff;
  color: #fff;
}
.cb-btn-accept:hover {
  opacity: .9;
}

.cb-btn-reject {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #111;
}
.cb-btn-reject:hover {
  background: #f3f4f6;
}

.cb-btn-customize {
  background: transparent;
  color: #6b7280;
  padding: .625rem .5rem;
}
.cb-btn-customize:hover {
  color: #00d4ff;
}

.cb-btn-save {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.3);
  color: #00b8d9;
}
.cb-btn-save:hover {
  background: rgba(0,212,255,.15);
}

/* Floating cookie icon */
.cb-fab {
  position: fixed;
  bottom: .75rem;
  left: .75rem;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cb-fab:hover {
  transform: scale(1.1);
  border-color: rgba(0,212,255,.4);
  box-shadow: 0 2px 20px rgba(0,212,255,.15);
}
.cb-fab svg {
  width: .875rem;
  height: .875rem;
  color: #6b7280;
}
@media (min-width: 640px) {
  .cb-fab {
    bottom: 1rem;
    left: 1rem;
    width: 3rem;
    height: 3rem;
  }
  .cb-fab svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Responsive: row layout on larger screens */
@media (min-width: 640px) {
  .cb-inner {
    padding: 1.5rem;
  }
  .cb-actions {
    flex-direction: row;
    align-items: center;
    gap: .75rem;
  }
}
