/* Match the 24 px Messenger heading visually; preserve artwork proportions
   and crop only the supplied images’ transparent outer margins. */
.brand {
    --brand-mark-size: 14px;
    --brand-mark-image-size: 21px;
    --brand-mark-offset: -3.5px;
    display: grid;
    grid-template-columns: var(--brand-mark-size) 104px;
    column-gap: 8px;
    align-items: center;
    width: max-content;
    max-width: 100%;
    flex-shrink: 0;
    text-decoration: none;
}
.brand .festation-brand-mark,
.brand .festation-brand-name {
    display: block;
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
    box-shadow: none;
}
.brand .festation-brand-mark {
    grid-column: 1;
    grid-row: 1;
    width: var(--brand-mark-size);
    height: var(--brand-mark-size);
}
.brand .festation-brand-mark img {
    position: absolute;
    top: var(--brand-mark-offset);
    left: var(--brand-mark-offset);
    display: block;
    width: var(--brand-mark-image-size);
    height: var(--brand-mark-image-size);
    max-width: none;
}
.brand .festation-brand-name { grid-column: 2; grid-row: 1; width: 104px; height: 22px; }
.brand .festation-brand-name img {
    position: absolute;
    top: -9px;
    left: -7.5px;
    display: block;
    width: 119px;
    height: auto;
    max-width: none;
}
.brand small { grid-column: 2; grid-row: 2; font: 500 7px/1.4 system-ui, sans-serif; letter-spacing: .1em; color: #526079; margin-top: 0; }
.brand:focus-visible { outline: 2px solid #0874fa; outline-offset: 5px; border-radius: 4px; }

/* Portal navigation and the footer use the name on its own. */
.top .brand,
.fi-topbar .brand,
.fi-sidebar .brand,
.footer-brand { grid-template-columns: 104px; column-gap: 0; }
.top .brand .festation-brand-mark,
.fi-topbar .brand .festation-brand-mark,
.fi-sidebar .brand .festation-brand-mark,
.footer-brand .festation-brand-mark { display: none; }
.top .brand .festation-brand-name, .top .brand small,
.fi-topbar .brand .festation-brand-name, .fi-topbar .brand small,
.fi-sidebar .brand .festation-brand-name, .fi-sidebar .brand small,
.footer-brand .festation-brand-name, .footer-brand small { grid-column: 1; }
.footer-brand, .fi-sidebar .festation-admin-brand { padding: 7px; background: #fff; border-radius: 7px; }
.festation-admin-brand { height: auto; }
.top .brand small, .festation-admin-brand small { font-size: 9px; }
.festation-error-brand, .festation-invoice-brand { margin-bottom: 20px; }
#festation-agreements .agreement-guest-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
#festation-agreements .agreement-guest-head .brand small { display: block; font-size: 9px; }

/* Filament normally hides its logo on mobile. Keep it visible, with search
   on a separate row so branding and account controls fit narrow screens. */
@media (max-width: 1023px) {
    .fi-topbar-ctn .fi-topbar { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
    .fi-topbar-ctn .fi-topbar-start { display: flex; margin-inline-end: 0; }
    .fi-topbar-ctn .fi-topbar-start .fi-logo { margin-inline-start: 0; }
    .fi-topbar-ctn .fi-topbar .festation-page-finder { order: 1; flex-basis: 100%; width: 100%; margin: 0; }
}

/* Compact navigation keeps the symbol visible and the name accessible. */
@media (max-width: 1023px) {
    .top .brand,
    .public-header .brand,
    .fi-topbar .brand,
    .fi-sidebar .brand {
        --brand-mark-size: 32px;
        --brand-mark-image-size: 48px;
        --brand-mark-offset: -8px;
        grid-template-columns: var(--brand-mark-size);
        column-gap: 0;
    }
    .top .brand .festation-brand-mark,
    .public-header .brand .festation-brand-mark,
    .fi-topbar .brand .festation-brand-mark,
    .fi-sidebar .brand .festation-brand-mark { display: block; }
    .top .brand .festation-brand-name, .top .brand small,
    .public-header .brand .festation-brand-name, .public-header .brand small,
    .fi-topbar .brand .festation-brand-name, .fi-topbar .brand small,
    .fi-sidebar .brand .festation-brand-name, .fi-sidebar .brand small {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}
@media (max-width: 600px) {
    .top .user-menu > button { padding: 4px; gap: 4px; }
    .top .user-menu > button b { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .auth-brand small, .festation-admin-brand small, .festation-maintenance-brand small { display: block; }
}
@media (max-width: 360px) {
    .top, .company-workspace .top { gap: 4px; }
    .top .mobile-menu { padding-inline: 2px; }
    .company-workspace .top .user-menu > button { padding: 2px; gap: 4px; }
}
