/* DBIM fixed social sidebar: navy tabs attached to the right edge, DBIM icons, label slides out on hover/focus. */
.dbim-follow {
    --f-navy: var(--dbim-key, #162f6a);
    --f-blue: var(--dbim-key-mid, #214aab);
    --f-bg: var(--dbim-white, #fff);
    --f-focus: var(--dbim-warning, #ffc107);
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%);
    z-index: 2147483000;
    width: auto;
    margin: 0;
}

.dbim-follow ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dbim-follow li {
    position: relative;
    margin: 0;
    padding: 0;
}

.dbim-follow a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--f-bg);
    border: 2px solid var(--f-navy);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, .35);
    text-decoration: none;
    transition: background-color .2s ease;
}

/* DBIM icons are navy (#162F6A): shown as-is on white, turned white on hover */
.dbim-follow img {
    display: block;
    width: 24px;
    height: 24px;
    transition: filter .2s ease;
}

.dbim-follow a:hover img,
.dbim-follow a:focus-visible img {
    filter: brightness(0) invert(1);
}

/* visible label that slides out to the left */
.dbim-follow-tip {
    position: absolute;
    right: 100%;
    top: 50%;
    margin-right: 8px;
    padding: 6px 12px;
    background: var(--f-navy);
    color: #fff;
    font: 600 var(--dbim-fs-p2, 14px)/1.2 var(--dbim-font, 'Noto Sans', Arial, Helvetica, sans-serif);
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transform: translate(8px, -50%);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    pointer-events: none;
}

.dbim-follow a:hover,
.dbim-follow a:focus-visible {
    background: var(--f-blue);
}

.dbim-follow a:hover .dbim-follow-tip,
.dbim-follow a:focus-visible .dbim-follow-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

.dbim-follow a:focus-visible {
    outline: 3px solid var(--f-focus);
    outline-offset: 2px;
}

.dbim-follow-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* dark theme (html[data-theme=dark]): deep navy surface, light edge, white icons */
html[data-theme="dark"] .dbim-follow {
    --f-navy: var(--d-accent, #a9c1ff);
    --f-blue: var(--d-btn, #3d6fe0);
    --f-bg: var(--d-surface, #161d3a);
}

html[data-theme="dark"] .dbim-follow img {
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] .dbim-follow-tip {
    background: var(--d-surface2, #1f2850);
    border-color: var(--d-border, #34406f);
    color: var(--d-text, #eceff9);
}

/* keep the icons when the visitor turns on "Hide images" in the accessibility panel */
html.a11y-images .dbim-follow img {
    display: block;
    visibility: visible;
}

/* phones: never show the floating bar (it would cover content); js/dbim-follow.js moves the same element into the footer */
@media (max-width: 767px) {
    .dbim-follow:not(.dbim-follow--footer) {
        display: none !important;
    }
}

/* phones: the bar sits in the footer as a horizontal row of tiles (placed by js/dbim-follow.js) */
.dbim-follow.dbim-follow--footer {
    position: static !important;
    transform: none;
    width: 100%;
    margin: 20px 0 0;
    padding: 0;
    z-index: auto;
    text-align: center;
}

.dbim-follow--footer ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.dbim-follow--footer a {
    width: 44px;
    height: 44px;
    border-right: 2px solid var(--f-navy);
    border-radius: 10px;
    box-shadow: none;
}

.dbim-follow--footer img {
    width: 22px;
    height: 22px;
}

.dbim-follow--footer .dbim-follow-tip {
    display: none;
}

/* the footer is dark navy: light tiles with navy icons stay visible; give them a white edge */
.dbim-follow--footer a {
    border-color: #fff;
}
@media (prefers-reduced-motion: reduce) {
    .dbim-follow a,
    .dbim-follow-tip {
        transition: none;
    }
}

@media print {
    .dbim-follow {
        display: none;
    }
}