/*
 * Copyright (C) 2026 Hans-Josef Pesch / TrainWerk.
 * TrainWerk Open Use License 1.0; backlink or coffee welcome.
 * Scoped enhancements: original topbar colors, heights and layout untouched
 * when no optional content is active.
 */
.tw-topbar .tw-container[data-tw-topbar-configured="true"] {
    align-items: center;
    gap: .45rem 1rem;
    flex-wrap: wrap;
}
.tw-topbar .tw-container [hidden] { display: none !important; }
.tw-topbar .tw-topbar-supplement {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem 1.2rem;
    flex-wrap: wrap;
    min-width: 0;
}
.tw-topbar .tw-topbar-links {
    display: flex;
    gap: .35rem .8rem;
    align-items: center;
    flex-wrap: wrap;
}
.tw-topbar .tw-topbar-link {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
    font-size: inherit;
    border-radius: 2px;
}
.tw-topbar .tw-topbar-link:hover { color: #fff; text-decoration: underline; }
.tw-topbar .tw-topbar-link:focus-visible { outline: 2px solid #fb923c; outline-offset: 3px; }
.tw-topbar .tw-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65em;
    min-width: 1.65em;
    height: 1.65em;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .95em;
    font-weight: 700;
    line-height: 1;
}
@media (max-width: 640px) {
    /* Original template hides every last-child span. After the right span is
       grouped, the remaining left span is itself last-child: restore it. */
    .tw-topbar .tw-container[data-tw-topbar-configured="true"] > span:first-child:not([hidden]) { display: inline; }
    .tw-topbar .tw-container .tw-topbar-links span.tw-topbar-icon { display: inline-flex; }
    .tw-topbar .tw-topbar-supplement[data-mobile="false"] .tw-topbar-links { display: none; }
    .tw-topbar .tw-topbar-supplement[data-mobile="true"] { margin-left: 0; }
    .tw-topbar .tw-topbar-supplement[data-mobile="true"] .tw-topbar-links { width: 100%; }
}
