/* L’envol surfaces only. Native editor canvases, forms and status colors keep their styles. */
body.tge-branding-enabled .tge-header .tge-masthead { padding: 22px 0; }
body.tge-branding-enabled .tge-header .tge-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
    text-align: center;
}
body.tge-branding-enabled .tge-header .tge-wordmark { display: block; line-height: 0; }
body.tge-branding-enabled .tge-header .tge-wordmark img {
    width: 320px;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 5 / 2;
    object-fit: contain;
}
body.tge-branding-enabled .tge-header .tge-tagline { margin: 0; text-align: center; }
body.tge-branding-enabled .tge-footer .tge-footer-brand .tge-wordmark img {
    width: 272px;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 55 / 12;
    object-fit: contain;
}

body.tge-branding-enabled .td-header-logo .td-main-logo img,
body.tge-branding-enabled .td-logo .td-main-logo img,
body.tge-branding-enabled .tdb_header_logo .tdb-logo-img,
body.tge-branding-enabled .custom-logo-link img.custom-logo {
    content: var(--tge-brand-stacked);
    width: 300px;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 5 / 2;
    object-fit: contain;
}
body.tge-branding-enabled .td-logo-in-menu img,
body.tge-branding-enabled .td-mobile-logo img,
body.tge-branding-enabled .td-mobile-logo .td-main-logo img {
    content: var(--tge-brand-horizontal);
    width: 220px;
    max-width: 100%;
    height: 48px;
    max-height: 100%;
    aspect-ratio: 55 / 12;
    object-fit: contain;
}
body.tge-branding-enabled .td-footer-wrapper .td-footer-logo img {
    content: var(--tge-brand-horizontal-reversed);
    width: 260px;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 55 / 12;
    object-fit: contain;
}

/* The ordinary WordPress controls stay recognizable and available in every role. */
body.tge-admin-branding {
    background: #f6f3ec;
    --wp-admin-theme-color: #143d34;
    --wp-admin-theme-color-darker-10: #10332b;
    --wp-admin-theme-color-darker-20: #0c2922;
}
body.tge-admin-branding #adminmenuback,
body.tge-admin-branding #adminmenuwrap,
body.tge-admin-branding #adminmenu {
    background: #143d34;
}
body.tge-admin-branding #adminmenu .wp-submenu { background: #10332b; }
body.tge-admin-branding #adminmenu a,
body.tge-admin-branding #adminmenu .wp-submenu a,
body.tge-admin-branding #collapse-button { color: #f6f3ec; }
body.tge-admin-branding #adminmenu div.wp-menu-image::before,
body.tge-admin-branding #collapse-button .collapse-button-icon::after { color: #c9d8cf; }
body.tge-admin-branding #adminmenu li.menu-top:hover,
body.tge-admin-branding #adminmenu li.opensub > a.menu-top,
body.tge-admin-branding #adminmenu li > a.menu-top:focus { background: #0c2922; color: #fff; }
body.tge-admin-branding #adminmenu li.menu-top:hover div.wp-menu-image::before,
body.tge-admin-branding #adminmenu li.opensub div.wp-menu-image::before,
body.tge-admin-branding #adminmenu li > a.menu-top:focus div.wp-menu-image::before { color: #f6f3ec; }
body.tge-admin-branding #adminmenu li.wp-has-current-submenu > a.wp-has-current-submenu,
body.tge-admin-branding #adminmenu li.current > a.menu-top {
    color: #143d34;
    background: #edeadf;
}
body.tge-admin-branding #adminmenu li.current div.wp-menu-image::before,
body.tge-admin-branding #adminmenu li.wp-has-current-submenu > a div.wp-menu-image::before { color: #143d34; }
body.tge-admin-branding #adminmenu a:hover,
body.tge-admin-branding #adminmenu a:focus { color: #fff; }
body.tge-admin-branding #adminmenu .wp-submenu li.current a,
body.tge-admin-branding #adminmenu .wp-submenu a:hover,
body.tge-admin-branding #adminmenu .wp-submenu a:focus { color: #fff; }
body.tge-admin-branding #adminmenu a:focus-visible,
body.tge-admin-branding #wpadminbar a:focus-visible { outline: 2px solid #e9d4a5; outline-offset: -3px; box-shadow: none; }
body.tge-admin-branding #wpbody-content > .wrap > h1,
body.tge-admin-branding #wpbody-content > .wrap > h2 { color: #143d34; }
body.tge-admin-branding .postbox { border-color: #d9dad0; box-shadow: none; }
body.tge-admin-branding .wp-list-table { border-color: #d9dad0; }
body.tge-admin-branding .wp-core-ui .button-primary,
body.tge-admin-branding.wp-core-ui .button-primary {
    background: #143d34;
    border-color: #143d34;
    color: #fff;
}
body.tge-admin-branding .wp-core-ui .button-primary:hover,
body.tge-admin-branding.wp-core-ui .button-primary:hover,
body.tge-admin-branding .wp-core-ui .button-primary:focus,
body.tge-admin-branding.wp-core-ui .button-primary:focus { background: #0c2922; border-color: #0c2922; color: #fff; }
body.tge-admin-branding .wp-core-ui .button-primary:disabled,
body.tge-admin-branding.wp-core-ui .button-primary:disabled { background: #d6ddd7 !important; border-color: #c4cdc6 !important; color: #53665a !important; }
.tge-admin-brand-header {
    min-height: 61px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 20px;
    padding: 12px 0 10px;
    border-bottom: 1px solid #d9dad0;
    color: #626b62;
}
.tge-admin-brand-header a { display: inline-flex; }
.tge-admin-brand-header img { display: block; width: 183px; height: 40px; object-fit: contain; }
.tge-admin-brand-header > span { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.tge-admin-footer-brand { white-space: nowrap; color: #143d34; }

/* Match the toolbar on public pages as well as inside wp-admin. */
body.tge-branding-enabled #wpadminbar,
body.tge-admin-branding #wpadminbar { background: #143d34; color: #f6f3ec; }
body.tge-branding-enabled #wpadminbar .ab-top-menu > li:hover > .ab-item,
body.tge-admin-branding #wpadminbar .ab-top-menu > li:hover > .ab-item,
body.tge-branding-enabled #wpadminbar .ab-sub-wrapper,
body.tge-admin-branding #wpadminbar .ab-sub-wrapper { background: #0c2922; }
#wpadminbar .tge-toolbar-brand { height: 32px; display: inline-flex; align-items: center; }
#wpadminbar .tge-toolbar-brand img { display: block; width: 119px; height: 26px; max-height: 26px; object-fit: contain; }

/* Login, password recovery and reset share the same bundled logo. */
body.tge-login-branding { background: #f6f3ec; color: #26362e; }
body.tge-login-branding #login { width: 340px; max-width: calc(100% - 40px); padding-top: max(38px, 7vh); }
body.tge-login-branding.login h1 a {
    background-image: var(--tge-brand-stacked);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 280px;
    max-width: 100%;
    height: 112px;
    margin: 0 auto 28px;
}
body.tge-login-branding .message,
body.tge-login-branding .notice:not(.notice-error):not(.notice-warning),
body.tge-login-branding .success { border-left-color: #143d34; }
body.tge-login-branding form { border-color: #d9dad0; box-shadow: 0 4px 24px rgba(20,61,52,.04); }
body.tge-login-branding .button-primary { background: #143d34; border-color: #143d34; }
body.tge-login-branding .button-primary:hover,
body.tge-login-branding .button-primary:focus { background: #0c2922; border-color: #0c2922; }
body.tge-login-branding #backtoblog a,
body.tge-login-branding #nav a,
body.tge-login-branding .privacy-policy-link { color: #143d34; }
body.tge-login-branding input:focus { border-color: #143d34; box-shadow: 0 0 0 1px #143d34; }
body.tge-login-branding .language-switcher { margin-bottom: 24px; }

@media (max-width: 782px) {
    #wpadminbar .tge-toolbar-brand { height: 46px; }
    #wpadminbar .tge-toolbar-brand img { width: 107px; height: 28px; max-height: 28px; }
    .tge-admin-brand-header { margin: 0 12px; padding-top: 13px; gap: 12px; }
    .tge-admin-brand-header img { width: 160px; height: 35px; }
    .tge-admin-brand-header > span { font-size: 10px; letter-spacing: .04em; }
}
@media (max-width: 720px) {
    body.tge-branding-enabled .tge-header .tge-masthead {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 20px 0;
    }
    body.tge-branding-enabled .tge-header .tge-brand { flex: 1 1 auto; gap: 10px; }
    body.tge-branding-enabled .tge-header .tge-wordmark { max-width: 100%; }
    body.tge-branding-enabled .tge-header .tge-wordmark img { width: 240px; max-width: 100%; max-height: none; }
    body.tge-branding-enabled .tge-header .tge-tagline { margin: 0; font-size: 12px; }
    body.tge-branding-enabled .tge-header .tge-menu-toggle { flex: 0 0 auto; }
    body.tge-branding-enabled .tge-footer .tge-footer-brand .tge-wordmark img { width: 240px; }
}
@media (max-width: 480px) {
    .tge-admin-brand-header > span { display: none; }
    body.tge-login-branding #login { padding-top: 28px; }
}
