/* COALS widths follow each asset’s visible emblem: 64px desktop, 48px mobile.
 * The complete official artwork remains intact and shrinks proportionally on narrow screens. */
/* Footer identity sizing is owned by the theme. Each brand selects its own
 * widths through theme.json; height:auto preserves the actual asset ratio. */
.global-footer, .site-footer {
    --agrilife-footer-unit-width: var(--wp--custom--footer--unit-logo-width, 24rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--unit-logo-mobile-width, 20rem);
    --agrilife-footer-affiliation-width: var(--wp--custom--footer--member-logo-width, 9rem);
    --agrilife-footer-affiliation-mobile-width: var(--wp--custom--footer--member-logo-mobile-width, 7rem);
    --agrilife-footer-logo-gap: var(--wp--custom--footer--logo-gap, 1.5rem);
}
.agrilife-footer-content--custom {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--custom--width, 20rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--custom--mobile-width, 18rem);
}
.agrilife-footer-content--agency {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--agency--width, 14rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--agency--mobile-width, 12rem);
}
.agrilife-footer-content--extension {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--extension--width, 13.5rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--extension--mobile-width, 12rem);
}
.agrilife-footer-content--research {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--research--width, 13.6633rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--research--mobile-width, 12.1452rem);
}
.agrilife-footer-content--college {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--college--width, 23.2197rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--college--mobile-width, 17.4148rem);
}
.agrilife-footer-content--dept_alec {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-alec--width, 29.9335rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-alec--mobile-width, 22.4501rem);
}
.agrilife-footer-content--dept_agec {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-agec--width, 29.7312rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-agec--mobile-width, 22.2984rem);
}
.agrilife-footer-content--dept_ansc {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-ansc--width, 22.1207rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-ansc--mobile-width, 16.5906rem);
}
.agrilife-footer-content--dept_baen {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-baen--width, 25.3125rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-baen--mobile-width, 18.9844rem);
}
.agrilife-footer-content--dept_bcbp {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-bcbp--width, 33.1424rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-bcbp--mobile-width, 24.8568rem);
}
.agrilife-footer-content--dept_eccb {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-eccb--width, 23.564rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-eccb--mobile-width, 17.673rem);
}
.agrilife-footer-content--dept_ento {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-ento--width, 20.5943rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-ento--mobile-width, 15.4457rem);
}
.agrilife-footer-content--dept_fstc {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-fstc--width, 18.937rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-fstc--mobile-width, 14.2027rem);
}
.agrilife-footer-content--dept_hort {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-hort--width, 29.4871rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-hort--mobile-width, 22.1153rem);
}
.agrilife-footer-content--dept_hmgt {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-hmgt--width, 25.838rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-hmgt--mobile-width, 19.3785rem);
}
.agrilife-footer-content--dept_nutr {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-nutr--width, 20.5943rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-nutr--mobile-width, 15.4457rem);
}
.agrilife-footer-content--dept_plpm {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-plpm--width, 19.3955rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-plpm--mobile-width, 14.5466rem);
}
.agrilife-footer-content--dept_posc {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-posc--width, 22.3284rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-posc--mobile-width, 16.7463rem);
}
.agrilife-footer-content--dept_rwfm {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-rwfm--width, 26.3505rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-rwfm--mobile-width, 19.7629rem);
}
.agrilife-footer-content--dept_scsc {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--dept-scsc--width, 27.1612rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--dept-scsc--mobile-width, 20.3709rem);
}
.agrilife-footer-content--center_tigm {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--center-tigm--width, 13.6633rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--center-tigm--mobile-width, 12.1452rem);
}
.agrilife-footer-content--txmn {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--txmn--width, 10.75rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--txmn--mobile-width, 9rem);
}
.agrilife-footer-content--txmg {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--txmg--width, 15.6875rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--txmg--mobile-width, 13rem);
}
.agrilife-footer-content--tamu {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--tamu--width, 16.875rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--tamu--mobile-width, 14rem);
}
.agrilife-footer-content--tamusa {
    --agrilife-footer-unit-width: var(--wp--custom--footer--brands--tamusa--width, 15rem);
    --agrilife-footer-unit-mobile-width: var(--wp--custom--footer--brands--tamusa--mobile-width, 15rem);
}

.global-footer .agrilife-footer-brand, .site-footer .agrilife-footer-brand,
.global-footer figure.footer-logo, .site-footer figure.footer-logo {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    margin: 0 0 var(--agrilife-footer-logo-gap);
}
.global-footer .agrilife-footer-logo, .site-footer .agrilife-footer-logo,
.global-footer figure.footer-logo > :is(img, svg), .site-footer figure.footer-logo > :is(img, svg) {
    display: block;
    width: var(--agrilife-footer-unit-width);
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: left center;
    margin: 0;
}
.global-footer :is(.agrilife-tamu-logo, .agrilife-member-logo, .agrilife-member-logo-mark),
.site-footer :is(.agrilife-tamu-logo, .agrilife-member-logo, .agrilife-member-logo-mark) {
    display: block;
    width: var(--agrilife-footer-affiliation-width);
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    margin: 0;
}
@media (max-width: 47.999em) {
    .global-footer .agrilife-footer-logo, .site-footer .agrilife-footer-logo,
    .global-footer figure.footer-logo > :is(img, svg), .site-footer figure.footer-logo > :is(img, svg) {
        width: var(--agrilife-footer-unit-mobile-width);
    }
    .global-footer :is(.agrilife-tamu-logo, .agrilife-member-logo, .agrilife-member-logo-mark),
    .site-footer :is(.agrilife-tamu-logo, .agrilife-member-logo, .agrilife-member-logo-mark) {
        width: var(--agrilife-footer-affiliation-mobile-width);
    }
}
.agrilife-footer-content--research { --agrilife-footer-logo-gap: 2rem; }
/* TAMUSA's horizontal and stacked lockups keep their dedicated column/crop. */
.agrilife-tamusa-footer__system-logo { width: min(100%, var(--agrilife-footer-affiliation-width)); margin: 1.5rem 0 0; }
@media (max-width: 47.999em) {
    .agrilife-tamusa-footer__system-logo { width: min(100%, var(--agrilife-footer-affiliation-mobile-width)); }
}
.agrilife-tamusa-footer__system-logo a { display: block; width: 100%; }
.agrilife-tamusa-footer__system-logo img { display: block; width: 100%; height: auto; max-width: 100%; }
.agrilife-tamusa-footer__brand { display: block; }
.agrilife-tamusa-footer__unit-logo { width: 100%; max-width: var(--wp--custom--footer--brands--tamusa--width, 15rem); margin: 0; }
.agrilife-tamusa-footer__unit-logo img.agl-tamusa-footerlogo { display: block; width: 100%; height: auto; max-width: 100%; max-height: none; }

/* Keep the top-bar emblem within its bar, independent of SVG presentation attributes. */
.global-header-bar .institutional-logo-link > :is(img, svg) {
    width: auto;
    height: auto;
    max-width: 60px;
    max-height: var(--wp--custom--header--logo-max-height, 2.75rem);
    object-fit: contain;
    display: block;
}

/* Long unit names must wrap inside the phone header instead of widening it. */
@media (max-width: 48em) {
    .global-header-bar .wp-block-group { min-width: 0; }
    .global-header-bar button:not(.header-search-toggle) { min-width: 0; overflow-wrap: anywhere; }
}
