#__cookie_banner__ {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  width: min(560px, calc(100% - 32px));
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  animation: __cb_slide_up 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes __cb_slide_up {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#__cookie_banner__.__cb_hide {
  animation: __cb_slide_down 0.25s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes __cb_slide_down {
  to { opacity: 0; transform: translateX(-50%) translateY(24px); }
}
.__cb_icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.__cb_body { flex: 1; }
.__cb_title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-main);
}
.__cb_text { color: var(--text-muted); line-height: 1.45; }
.__cb_text a { color: var(--accent); text-decoration: underline; }
.__cb_btns {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.__cb_btn {
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.__cb_btn_accept {
  background: var(--accent);
  color: var(--on-accent);
}
.__cb_btn_accept:hover { background: var(--accent-hover); }
.__cb_btn_save { background: var(--success); color: var(--on-accent); }
.__cb_btn_save:hover { background: var(--badge-success-fg); }
.__cb_btn_hidden { display: none !important; }
.__cb_btn_reject {
  background: transparent;
  border-color: var(--border-input);
  color: var(--text-muted);
}
.__cb_btn_reject:hover { background: var(--surface); }
.__cb_btn_settings {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding-left: 4px;
  padding-right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.__cb_btn_settings:hover { text-decoration: underline; }
.__cb_btn_icon { width: 14px; height: 14px; flex-shrink: 0; }
.__cb_close {
  position: absolute;
  top: 10px; right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: none; border: none;
  border-radius: 8px;
  color: var(--text-subtle);
  cursor: pointer; padding: 0;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
.__cb_close svg { width: 18px; height: 18px; display: block; }
.__cb_close:hover { color: var(--text-main); background: var(--surface); }

.__cb_settings_panel {
  margin-top: 12px;
  background: var(--surface);
  border-radius: 8px;
  padding: 12px 14px;
  display: none;
}
.__cb_settings_panel.open { display: block; }
.__cb_toggle_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.__cb_toggle_row:last-child { border-bottom: none; }
.__cb_toggle_label {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 600;
}
.__cb_toggle_desc { font-size: 11px; color: var(--text-subtle); margin-top: 1px; }
.__cb_switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.__cb_switch input { opacity: 0; width: 0; height: 0; }
.__cb_slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-input);
  border-radius: 10px;
  transition: background 0.2s;
}
.__cb_slider:before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; bottom: 3px;
  background: var(--on-accent);
  border-radius: 50%;
  transition: transform 0.2s;
}
.__cb_switch input:checked + .__cb_slider { background: var(--accent); }
.__cb_switch input:checked + .__cb_slider:before { transform: translateX(16px); }
.__cb_switch input:disabled + .__cb_slider { opacity: 0.6; cursor: not-allowed; }

.__cb_dismiss_notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 10001;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-elevated, #1a1a1a);
  color: var(--text-primary, #f5f5f5);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.__cb_dismiss_notice_visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  #__cookie_banner__ {
    bottom: 12px;
    border-radius: 12px;
    flex-direction: column;
    gap: 10px;
  }
}
