/* Dark/light mode toggle, customizable dock and Privacy & Consent panel.
 * Loaded after launcher.css. Logic lives in assets/js/customize.js. */

/* ---------- Dark / light toggle (sits right after the Theme switcher) ---------- */
.bbhg-mode-toggle {
    height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; flex: none;
    border: 0; border-radius: 10px; background: #f1f5f9; color: #1f2937;
    font-weight: 600; font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.bbhg-mode-toggle[hidden] { display: none; }
.bbhg-mode-toggle:hover:not([disabled]) { background: #e2e8f0; }
.bbhg-mode-toggle:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }
.bbhg-mode-toggle svg { width: 16px; height: 16px; flex: none; }
.bbhg-mode-toggle .bbhg-mode-sun { display: none; }
.bbhg-mode-toggle[aria-pressed="true"] .bbhg-mode-sun { display: block; }
.bbhg-mode-toggle[aria-pressed="true"] .bbhg-mode-moon { display: none; }
.bbhg-mode-toggle[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) { .bbhg-mode-toggle .bbhg-mode-label { display: none; } .bbhg-mode-toggle { width: 40px; padding: 0; justify-content: center; } }
.bbhg-theme-launcher .bbhg-mode-toggle { background: #efebe4; border-radius: 99px; color: #4a443b; }
.bbhg-theme-nightwatch .bbhg-mode-toggle, .bbhg-theme-matrix .bbhg-mode-toggle, .bbhg-theme-galaxy .bbhg-mode-toggle { background: #1a222d !important; color: #aab6c4 !important; }
.bbhg-theme-marquee .bbhg-mode-toggle, .bbhg-theme-mosaic .bbhg-mode-toggle { background: #fff !important; color: #111 !important; }

/* Dark mode: Classic and Launcher only (the other themes are already dark or keep their own palette).
 * The whole modal is inverted and hue-rotated back, then photos, video, maps tiles and the dock bar are inverted again so they keep their real colours. */
.bbhg-mode-dark:not(.bbhg-theme-nightwatch):not(.bbhg-theme-marquee):not(.bbhg-theme-mosaic):not(.bbhg-theme-matrix):not(.bbhg-theme-galaxy) .bbhg-modal { filter: invert(1) hue-rotate(180deg); }
.bbhg-mode-dark:not(.bbhg-theme-nightwatch):not(.bbhg-theme-marquee):not(.bbhg-theme-mosaic):not(.bbhg-theme-matrix):not(.bbhg-theme-galaxy) .bbhg-modal :is(img, video, canvas, iframe, picture, .bbhg-dk-bar, .bbhg-pv-keep, [style*="background-image"]) { filter: invert(1) hue-rotate(180deg); }

/* ---------- Customizable dock ---------- */
.bbhg-dk-btn.bbhg-dk-off { display: none !important; }
.bbhg-dock.bbhg-dk-sz-s .bbhg-dk-btn { width: 36px; height: 36px; border-radius: 11px; }
.bbhg-dock.bbhg-dk-sz-s .bbhg-dk-btn svg { width: 20px; height: 20px; }
.bbhg-dock.bbhg-dk-sz-s .bbhg-dk-bar { gap: 6px; padding: 8px 12px; }
.bbhg-dock.bbhg-dk-sz-l .bbhg-dk-btn { width: 54px; height: 54px; border-radius: 17px; }
.bbhg-dock.bbhg-dk-sz-l .bbhg-dk-btn svg { width: 30px; height: 30px; }
.bbhg-dock.bbhg-dk-sz-l .bbhg-dk-bar { gap: 10px; padding: 12px 16px; }
/* Always-visible labels: a short caption under each icon (works on phones too, where hover tooltips are hidden). */
.bbhg-dk-lbl { display: none; }
.bbhg-dock.bbhg-dk-labels .bbhg-dk-bar { padding-bottom: 26px; }
.bbhg-dock.bbhg-dk-labels .bbhg-dk-lbl {
    display: block; position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); width: 60px; text-align: center; pointer-events: none;
    font-family: inherit; font-size: 9.5px; font-weight: 800; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase;
    color: #b8c2d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bbhg-dock.bbhg-dk-labels .bbhg-dk-btn.on .bbhg-dk-lbl { color: #fff; }
.bbhg-dock.bbhg-dk-labels .bbhg-dk-btn.on { transform: none; }
.bbhg-dock.bbhg-dk-labels .bbhg-dk-btn::after { display: none; }
.bbhg-dock.bbhg-dk-labels .bbhg-dk-tip { display: none !important; }
.bbhg-dock.bbhg-dk-labels .bbhg-dk-bar { gap: 14px; }
.bbhg-dock .bbhg-dk-cust-btn { --c: #475569; }

.bbhg-dk-cust {
    position: absolute; left: 50%; bottom: calc(100% - 4px); transform: translateX(-50%); z-index: 10002;
    width: min(440px, calc(100% - 20px)); max-height: min(64vh, 520px); overflow-y: auto; box-sizing: border-box; padding: 14px;
    background: #fff; color: #0f172a; border-radius: 20px; border-top: 4px solid #475569; box-shadow: 0 18px 50px rgba(20, 22, 27, .35);
    font-weight: 500; font-size: 13px; line-height: 1.35; font-family: inherit;
}
.bbhg-dk-cust[hidden], .bbhg-dock.bbhg-dk-min .bbhg-dk-cust { display: none !important; }
.bbhg-dk-cust-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.bbhg-dk-cust-head b { font-size: 16px; }
.bbhg-dk-cust-x { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #f1f5f9; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.bbhg-dk-cust-sub { margin: 0 0 8px; color: #64748b; font-size: 12px; }
.bbhg-dk-cust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bbhg-dk-cust-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; background: #f8fafc; }
.bbhg-dk-cust-row label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.bbhg-dk-cust-row input { width: 18px; height: 18px; flex: none; }
.bbhg-dk-cust-ico { flex: none; width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--c, #475569); }
.bbhg-dk-cust-ico svg { width: 17px; height: 17px; }
.bbhg-dk-cust-nm { overflow-wrap: anywhere; font-weight: 600; }
.bbhg-dk-cust-row.off .bbhg-dk-cust-nm { opacity: .5; text-decoration: line-through; }
.bbhg-dk-cust-mv { display: flex; gap: 2px; flex: none; }
.bbhg-dk-cust-mv button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #e2e8f0; color: inherit; cursor: pointer; font-size: 13px; }
.bbhg-dk-cust-mv button:disabled { opacity: .35; cursor: default; }
.bbhg-dk-cust-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.bbhg-dk-cust-seg { display: inline-flex; border-radius: 9px; overflow: hidden; border: 1px solid #cbd5e1; }
.bbhg-dk-cust-seg button { border: 0; padding: 6px 12px; background: #fff; color: inherit; cursor: pointer; font-weight: 600; }
.bbhg-dk-cust-seg button[aria-pressed="true"] { background: #475569; color: #fff; }
.bbhg-dk-cust-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.bbhg-dk-cust-foot small { color: #64748b; font-size: 11.5px; }
.bbhg-dk-cust-reset { border: 0; border-radius: 9px; padding: 7px 12px; background: #f1f5f9; color: inherit; cursor: pointer; font-weight: 600; }
.bbhg-dk-cust button:focus-visible, .bbhg-dk-cust input:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }

/* ---------- Privacy & Consent panel ---------- */
.bbhg-pv { max-width: 880px; margin: 0 auto; }
.bbhg-pv-header { padding: 20px 22px; border-radius: 14px; background: linear-gradient(135deg, #0f766e, #0f172a); color: #fff; margin-bottom: 16px; }
.bbhg-pv-header h2 { margin: 0; color: #fff; font-size: 20px; }
.bbhg-pv-header p { margin: 4px 0 0; opacity: .88; font-size: 13px; }
.bbhg-pv-card { border: 1px solid rgba(128, 128, 128, .25); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; background: rgba(128, 128, 128, .05); }
.bbhg-pv-card h3 { margin: 0 0 8px; font-size: 15px; }
.bbhg-pv-site p { margin: 0; font-size: 13px; line-height: 1.6; }
.bbhg-pv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid rgba(128, 128, 128, .18); }
.bbhg-pv-row:first-of-type { border-top: 0; }
.bbhg-pv-row strong { display: block; font-size: 14px; }
.bbhg-pv-row small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; opacity: .75; }
.bbhg-pv-sw { position: relative; flex: none; width: 46px; height: 26px; }
.bbhg-pv-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.bbhg-pv-sw span { position: absolute; inset: 0; border-radius: 99px; background: #94a3b8; transition: background .15s; }
.bbhg-pv-sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.bbhg-pv-sw input:checked + span { background: #0f766e; }
.bbhg-pv-sw input:checked + span::after { transform: translateX(20px); }
.bbhg-pv-sw input:disabled { cursor: default; }
.bbhg-pv-sw input:disabled + span { opacity: .6; }
.bbhg-pv-sw input:focus-visible + span { outline: 2px solid #0ea5e9; outline-offset: 2px; }
.bbhg-pv-status { min-height: 18px; margin: 8px 0 0; font-size: 12.5px; color: #0f766e; }
.bbhg-pv-list { display: grid; gap: 4px; font-size: 13px; }
.bbhg-pv-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; background: rgba(128, 128, 128, .08); }
.bbhg-pv-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bbhg-pv-item small { opacity: .65; white-space: nowrap; }
.bbhg-pv-item button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; }
.bbhg-pv-ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.65; }
.bbhg-pv-ul li { margin-bottom: 4px; }
.bbhg-pv-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.bbhg-pv-btn { display: inline-block; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; font-size: 13px; line-height: 1.2; font-family: inherit; text-decoration: none; background: #0f766e; color: #fff; cursor: pointer; }
.bbhg-pv-btn.alt { background: transparent; color: inherit; border-color: rgba(128, 128, 128, .45); }
.bbhg-pv-btn.danger { background: transparent; color: #b91c1c; border-color: rgba(185, 28, 28, .5); }
.bbhg-pv-fine { font-size: 12px; opacity: .72; line-height: 1.5; margin: 0; }
.bbhg-pv button:focus-visible, .bbhg-pv a:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }

/* First-visit notice and the lookup-tool gate (both live inside the modal) */
.bbhg-pv-banner {
    position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 10040; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    padding: 12px 14px; border-radius: 14px; background: #0f172a; color: #e2e8f0; box-shadow: 0 12px 34px rgba(0, 0, 0, .4); font-size: 13px; line-height: 1.45;
}
.bbhg-pv-banner[hidden] { display: none; }
.bbhg-pv-banner p { flex: 1 1 260px; margin: 0; }
.bbhg-pv-banner .bbhg-pv-btn { padding: 8px 13px; }
.bbhg-pv-banner .bbhg-pv-btn.alt { color: #e2e8f0; border-color: rgba(226, 232, 240, .4); }
.bbhg-pv-gate { position: absolute; z-index: 10030; display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px; box-sizing: border-box; overflow-y: auto; background: rgba(15, 23, 42, .78); backdrop-filter: blur(3px); }
.bbhg-pv-gate[hidden] { display: none; }
.bbhg-pv-gate-card { width: min(520px, 100%); padding: 20px 22px; border-radius: 16px; background: #fff; color: #0f172a; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.bbhg-pv-gate-card h3 { margin: 0 0 8px; font-size: 18px; }
.bbhg-pv-gate-card ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.bbhg-pv-gate-card label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; cursor: pointer; margin-bottom: 14px; }
.bbhg-pv-gate-card input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.bbhg-pv-gate-card .bbhg-pv-btn[disabled] { opacity: .45; cursor: not-allowed; }
.bbhg-pv-gate-card .bbhg-pv-btn.alt { color: #0f172a; border-color: #cbd5e1; }
@media (prefers-reduced-motion: reduce) { .bbhg-pv-sw span, .bbhg-pv-sw span::after { transition: none; } }

/* Compact dock: smaller labels to match the smaller icons */
.bbhg-dock.bbhg-dk-sz-s.bbhg-dk-labels .bbhg-dk-lbl { font-size: 8px; width: 48px; letter-spacing: .01em; top: calc(100% + 3px); }
.bbhg-dock.bbhg-dk-sz-s.bbhg-dk-labels .bbhg-dk-bar { padding-bottom: 22px; gap: 10px; }

/* Match the other header buttons: same 40px height and pill shape as the Theme button, and beat the site theme's generic button sizing. */
.bbhg-modal-overlay .bbhg-mode-toggle {
    box-sizing: border-box; height: 40px !important; min-height: 40px !important; min-width: 0 !important; margin: 0; line-height: 1;
    font-family: inherit; font-size: 13px; font-weight: 600; border: 0 !important; box-shadow: none; text-transform: none; letter-spacing: normal;
}
.bbhg-modal-overlay .bbhg-mode-toggle:not([hidden]) { display: inline-flex; }
.bbhg-theme-dock .bbhg-mode-toggle { background: #fff; border-radius: 99px; color: #1f2937; font-family: var(--dk-font, inherit); }
.bbhg-theme-dock .bbhg-mode-toggle:hover:not([disabled]) { background: #f1f5f9; }
.bbhg-modal-overlay .bbhg-mode-toggle svg { width: 18px !important; height: 18px !important; stroke: currentColor; fill: none; }
@media (max-width: 640px) {
    .bbhg-modal-overlay .bbhg-mode-toggle { width: 34px !important; height: 34px !important; min-height: 34px !important; min-width: 34px !important; max-width: 34px; padding: 0 !important; justify-content: center; }
}
