﻿/* ==========================================================================
   DBIM top bar: icon-only controls (language, accessibility) with dropdowns,
   plus sticky main menu (DBIM 5.4).  Loaded AFTER dbim-topbar.css.
   Colours: Blue group  - key #162F6A, lightest tint #D2DFFF, mid #5279D7.
   ========================================================================== */

.topbar-tools { display: flex; align-items: center; }

.tb-item { position: relative; border-left: 1px solid rgba(255,255,255,.45); }
.tb-item:last-child { border-right: 1px solid rgba(255,255,255,.45); }

.tb-btn {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 44px; padding: 0; background: none; border: 0;
  color: #fff; cursor: pointer;
}
.tb-btn svg { width: 24px; height: 24px; }
.tb-btn:hover { background: rgba(255,255,255,.15); }
.tb-btn:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

.tb-menu {
  position: absolute; right: 0; top: 100%; z-index: 1000;
  min-width: 170px; margin: 0; padding: 6px 0; list-style: none;
  background: #fff; color: #150202;
  border: 1px solid #C6C6C6; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.tb-menu[hidden] { display: none; }
.tb-menu a { display: block; padding: 10px 16px; color: #150202; text-decoration: none; }
.tb-menu a:hover, .tb-menu a:focus-visible,
.tb-menu a[aria-current="true"] { background: #D2DFFF; font-weight: 600; }

.tb-menu--a11y { min-width: 230px; padding: 10px 14px; }
.tb-h { margin: 8px 0 6px; font-size: 14px; font-weight: 600; }
.tb-row { display: flex; gap: 8px; }
.tb-row button {
  flex: 1; padding: 8px 6px; font: inherit; font-size: 14px; cursor: pointer;
  background: #fff; color: #162F6A; border: 1px solid #162F6A; border-radius: 4px;
}
.tb-row button:hover,
.tb-row button[aria-pressed="true"] { background: #162F6A; color: #fff; }
.tb-row button:focus-visible { outline: 3px solid #5279D7; outline-offset: 2px; }

/* sticky main menu (DBIM 5.4).  If it does not stick, an ancestor has overflow:hidden/auto. */
.s3-nav { position: sticky; top: 0; z-index: 900; }

/* high-contrast mode (html.hc is set by dbim-topbar.js / the head script) */
html.hc .tb-menu, html.hc .tb-row button { background: #000; color: #fff; border-color: #fff; }
html.hc .tb-menu a { color: #fff; }
html.hc .tb-menu a:hover, html.hc .tb-menu a[aria-current="true"] { background: #fff; color: #000; }