#cb-banner[hidden], #cb-banner [hidden], #cb-reopen[hidden] { display: none !important; }

.cb-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
  font-size: 14px;
  line-height: 1.5;
  max-height: 85vh;
  overflow-y: auto;
  animation: cb-up .3s ease-out;
}
@keyframes cb-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .cb-banner { animation: none; } }

.cb-main {
  max-width: 1170px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.cb-text { flex: 1 1 auto; min-width: 0; }
.cb-title { font-weight: bold; font-size: 16px; margin: 0 0 4px; }
.cb-message { margin: 0; max-width: 75ch; }
.cb-message a { text-decoration: underline; }

.cb-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cb-btn {
  display: inline-block;
  min-width: 130px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.cb-btn-secondary { background: transparent; }
.cb-btn:hover { opacity: .85; }

.cb-link {
  background: none;
  border: 0;
  padding: 10px 6px;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.cb-banner button:focus,
.cb-banner a:focus,
.cb-switch input:focus + .cb-slider,
.cb-reopen:focus {
  outline: 3px solid #2684ff;
  outline-offset: 2px;
}

/* Preferencias */
.cb-settings {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px 18px;
}
.cb-categories {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(128, 128, 128, .3);
}
.cb-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(128, 128, 128, .3);
}
.cb-category-text strong { display: block; }
.cb-category-text span { display: block; opacity: .8; font-size: 13px; }
.cb-always { font-size: 13px; font-weight: bold; white-space: nowrap; opacity: .8; }
.cb-settings-actions { text-align: right; padding-top: 14px; }

/* Interruptor */
.cb-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}
.cb-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cb-slider {
  position: absolute;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #bbb;
  border-radius: 26px;
  transition: background .2s;
}
.cb-slider:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.cb-switch input:checked + .cb-slider:before { transform: translateX(20px); }
.cb-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Botón para reabrir */
.cb-reopen {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99998;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Móvil */
@media (max-width: 767px) {
  .cb-main { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .cb-actions { flex-wrap: wrap; }
  .cb-actions .cb-btn { flex: 1 1 40%; min-width: 0; }
  .cb-actions .cb-link { order: 3; flex: 1 1 100%; }
  .cb-settings { padding: 0 16px 16px; }
  .cb-settings-actions .cb-btn { width: 100%; }
}
