#header-bar {
    margin-top: 8px;
    margin-bottom: 24px;
}

.header-bar-container {
    width: 100%;
    background: #f6f8fa;
    border-bottom: 1.5px solid #eaecef;
    padding: 4px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
}

.header-bar-logo {
    height: 20px;
    scale: 3.5;
    margin-left: 16px;
    margin-right: 32px;
}

.header-bar-logo-link {
    display: inline-flex;
    align-items: center;
    margin-left: 16px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.15s ease;
}

.header-bar-logo-link .header-bar-logo {
    margin-left: 0;
}

.header-bar-logo-link:focus-visible {
    outline: 2px solid #5d84c1;
    outline-offset: 2px;
}

.header-bar-logo-link:hover {
    transform: scale(1.06);
}

a.header-bar-sub-title {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.header-bar-sub-title:focus-visible {
    border-radius: 4px;
    outline: 2px solid #5d84c1;
    outline-offset: 2px;
}

a.header-bar-sub-title:hover {
    text-decoration: underline;
}

.header-bar-content {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.header-bar-left,
.header-bar-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-bar-center {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.header-bar-icon:hover {
    color: var(--theme-accent);
}

.header-bar-title {
    font-size: 20px;
    font-weight: 500;
    color: #5D84C1;
}

.header-bar-sub-title {
    font-size: 20px;
    font-weight: 500;
    color: #696969;
}

.header-bar-separator {
    font-size: 22px;
    font-weight: 500;
    color: rgb(150, 150, 150);
    margin: 0 16px;
}

.header-bar-right {
    justify-content: flex-end;
}

.header-bar-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 400;
    color: rgb(150, 150, 150);
    margin: 0 8px;
    background-color: #FFF;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.15s;
    border: none;
    outline: none;
}

.header-bar-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #5D84C1;
}

.header-bar-icon:hover {
    background-color: #f0f6ff;
    color: #365A92;
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(54, 90, 146, 0.25);
}

.header-bar-icon:hover i {
    color: #365A92;
}

.header-bar-icon:hover img[data-ext="svg"] {
    filter: brightness(0) saturate(100%) invert(27%) sepia(52%) saturate(500%) hue-rotate(191deg) brightness(85%) contrast(95%);
}

.header-bar-icon.header-bar-icon-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.header-bar-icon.header-bar-icon-disabled:hover {
    transform: none;
    box-shadow: none;
}

.header-kb-toggle-wrapper {
    position: relative;
}

.header-kb-toggle-group {
    position: relative;
    z-index: 50051;
}

.header-toggle-wrapper {
    position: relative;
}

.header-bar-icon.header-bar-icon-disabled.header-icon-active,
.header-bar-icon.header-bar-icon-disabled.word-tooltips-active {
    opacity: 0.55;
}

/* Shared by header keyboard icon and stats-bar keyboard toggle (see keyboard.php) */
.blind-kb-disabled-tooltip {
    position: absolute;
    left: 40%;
    background: #1e2229;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    color: #f5f7fa;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
    z-index: 50050;
    pointer-events: none;
}

.blind-kb-disabled-tooltip-top {
    bottom: calc(100% + 10px);
}

.blind-kb-disabled-tooltip-bottom {
    top: calc(100% + 10px);
    z-index: 50050;
}

.blind-kb-disabled-tooltip-right {
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 50050;
}

.blind-kb-disabled-tip-enter {
    transition: opacity 0.16s ease;
}

.blind-kb-disabled-tip-enter-start {
    opacity: 0;
}

.blind-kb-disabled-tip-enter-end {
    opacity: 1;
}

.blind-kb-disabled-tip-leave {
    transition: opacity 0.14s ease;
}

.blind-kb-disabled-tip-leave-start { 
    opacity: 1;
}

.blind-kb-disabled-tip-leave-end {
    opacity: 0;
}

.header-bar-icon {
    /* Keep 46px + 2px border = 50px visual even when Bootstrap reboot sets border-box */
    box-sizing: content-box;
    border: 2px solid transparent;
}

.header-bar-icon.word-tooltips-active {
    border: 1px solid var(--theme-accent);
}

.header-bar-icon.ai-active {
    background-color: var(--theme-accent);
}

.header-bar-icon.ai-active img[data-ext="svg"] {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(100%) contrast(100%);
}

.header-icon-active {
    background-color: var(--theme-accent);
}

.header-icon-active:hover {
    background-color: var(--theme-accent-strong);
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(24, 40, 80, 0.4);
}

.header-icon-active i {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(100%) contrast(100%);
}

.header-icon-active img[data-ext="svg"] {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(100%) contrast(100%);
}

.header-icon-active:hover img[data-ext="svg"] {
    filter: brightness(0) saturate(100%) invert(85%) sepia(20%) saturate(300%) hue-rotate(185deg) brightness(110%) contrast(100%);
}