/* Cookie-consent banner (self-contained; own .cc- namespace to avoid collisions). */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(0);
  z-index: 9000;
  width: calc(100% - 2rem);
  max-width: 46rem;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  animation: cc-in 0.35s ease both;
}
@media (prefers-reduced-motion: reduce) { .cc-banner { animation: none; } }
@keyframes cc-in { from { opacity: 0; transform: translateX(-50%) translateY(1rem); } }

.cc-text { flex: 1 1 18rem; font-size: 0.92rem; line-height: 1.5; }
.cc-text strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; color: #0f172a; }
.cc-text a { color: #b45309; text-decoration: underline; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.cc-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.cc-btn:active { transform: translateY(1px); }
.cc-accept { background: #f59e0b; color: #111827; }
.cc-accept:hover { background: #d98908; }
.cc-decline { background: transparent; color: #334155; border-color: #cbd5e1; }
.cc-decline:hover { border-color: #94a3b8; background: #f1f5f9; }
.cc-btn:focus-visible { outline: 3px solid #f59e0b66; outline-offset: 2px; }

/* Dark theme */
:root[data-theme="dark"] .cc-banner,
html[data-theme="dark"] .cc-banner {
  background: #111a2e;
  color: #cbd5e1;
  border-color: #23324e;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}
:root[data-theme="dark"] .cc-text strong { color: #f8fafc; }
:root[data-theme="dark"] .cc-text a { color: #fbbf24; }
:root[data-theme="dark"] .cc-decline { color: #cbd5e1; border-color: #334155; }
:root[data-theme="dark"] .cc-decline:hover { background: #1c2740; border-color: #475569; }

@media (max-width: 560px) {
  .cc-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: none;
    border-radius: 16px 16px 0 0;
    animation-name: cc-in-mobile;
    /* Clear the floating chat bar pinned to the bottom of the viewport, so it
       never covers the buttons, and respect the iPhone home-indicator inset. */
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }
  /* In a column flex container flex-basis sizes the HEIGHT — the desktop
     `flex: 1 1 18rem` would reserve 18rem of blank space above the buttons. */
  .cc-text { flex: 0 1 auto; }
  .cc-actions { justify-content: stretch; }
  .cc-btn { flex: 1 1 auto; text-align: center; padding-top: .75rem; padding-bottom: .75rem; }
}
@keyframes cc-in-mobile { from { opacity: 0; transform: translateY(1rem); } }
