/* ==========================================================================
   Cookie consent banner and settings dialog
   (includes/cookie-banner.php, js/cookie-consent.js). The banner sits just
   under Bootstrap's modal layer (1050+), so "More Settings" opens on top of it.
   ========================================================================== */
.bm-cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045;
  padding: 0 16px 16px; pointer-events: none;
}
.bm-cookie[hidden] { display: none; }
.bm-cookie-card {
  pointer-events: auto;
  max-width: 980px; margin: 0 auto;
  background: var(--bm-card); color: var(--bm-ink);
  border: 1px solid var(--bm-border); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(7,27,60,.28);
  padding: 1.6rem 1.8rem;
}
.bm-cookie-title { font-family: var(--bm-font-head); font-size: 1.3rem; font-weight: 700; color: var(--bm-ink); margin: 0 0 .7rem; }
.bm-cookie-card p { color: var(--bm-muted); font-size: .95rem; line-height: 1.65; margin: 0 0 1.3rem; }
.bm-cookie a, .bm-cookie-modal .modal-body a { font-weight: 600; }
.bm-cookie-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.bm-cookie-actions [data-cookie="settings"] { margin-right: auto; }
.bm-cookie-actions button, .bm-cookie-modal .modal-footer button { justify-content: center; }

.bm-cookie-modal { background: var(--bm-card); color: var(--bm-ink); border: 1px solid var(--bm-border); border-radius: 18px; }
.bm-cookie-modal .modal-header, .bm-cookie-modal .modal-footer { border-color: var(--bm-border); }
.bm-cookie-modal .modal-title { font-family: var(--bm-font-head); font-size: 1.25rem; font-weight: 700; }
.bm-cookie-modal .modal-body > p { color: var(--bm-muted); font-size: .93rem; line-height: 1.65; }
.bm-cookie-modal .modal-footer { gap: .6rem; flex-wrap: wrap; }
.bm-cookie-modal .modal-footer > * { margin: 0; }
.bm-cookie-modal .modal-footer [data-cookie="save"] { margin-right: auto; }
@media (min-width: 576px) { .bm-cookie-dialog { max-width: 640px; } }
.bm-cookie-cat { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 14px; padding: 1rem 1.1rem; margin-top: .9rem; }
.bm-cookie-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .4rem; }
.bm-cookie-cat h3 { font-family: var(--bm-font-head); font-size: 1rem; font-weight: 700; margin: 0; }
.bm-cookie-cat h3 label { cursor: pointer; }
.bm-cookie-cat p { color: var(--bm-muted); font-size: .88rem; line-height: 1.6; margin: 0; }
.bm-cookie-always { color: #198754; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.bm-cookie-modal .form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }

/* Footer "Cookie Settings": a button, styled like the links beside it */
.bm-legal-row .bm-cookie-link { background: none; border: 0; padding: 0; color: #9fb4d8; font-size: .86rem; cursor: pointer; transition: color .2s ease; }
.bm-legal-row .bm-cookie-link:hover { color: #fff; }

[data-bs-theme="dark"] .bm-cookie-card { box-shadow: 0 24px 60px rgba(0,0,0,.55); }
[data-bs-theme="dark"] .bm-cookie a,
[data-bs-theme="dark"] .bm-cookie-modal a { color: #7fa6ff; }
[data-bs-theme="dark"] .bm-cookie-always { color: #5dd39e; }

@media (max-width: 767.98px) {
  .bm-cookie { padding: 0 10px 10px; }
  .bm-cookie-card { padding: 1.2rem 1.1rem; max-height: 80vh; overflow-y: auto; }
  .bm-cookie-title { font-size: 1.1rem; }
  .bm-cookie-actions button, .bm-cookie-modal .modal-footer button { flex: 1 1 100%; }
  .bm-cookie-actions [data-cookie="settings"],
  .bm-cookie-modal .modal-footer [data-cookie="save"] { margin-right: 0; }
  .bm-legal-row .bm-cookie-link { display: inline-block; padding: .5rem 0; }
}
