/*
 * Shared overflow fixes and homepage stacking.
 * Image crop windows, maps and scrollable data tables keep their own clipping.
 */
body#top main fieldset {
    min-width: 0;
    max-width: 100%;
}
body#top main legend {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
body#top main :is(input, select, textarea) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
body#top :is(.repeatable-table-wrapper, .finance-table-scroll) {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}
body#top .site-directory-footer__group {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Shared portal styles set a short aspect ratio on adoption cards.
 * Let each frame grow around the photo and the complete information body. */
body#top .rescue-pet-card .rescue-pet-card__frame {
    height: auto;
    aspect-ratio: auto;
}

/* The message is a sibling of the decorative sections, in normal document flow. */
body#top.page-home main {
    position: static !important;
    z-index: auto !important;
    isolation: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
}
body#top.page-home .home-message {
    position: relative !important;
    inset: auto !important;
    z-index: 4000 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(.75rem, 2vw, 2rem) !important;
    overflow: visible !important;
    transform: none !important;
    translate: none !important;
    scale: 1 !important;
    pointer-events: none;
}
body#top.page-home .home-message__inner {
    position: relative !important;
    inset: auto !important;
    z-index: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    translate: none !important;
}
body#top.page-home .home-message__title {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 80rem !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: .15em .35em !important;
    color: #1d59a8 !important;
    -webkit-text-fill-color: #1d59a8 !important;
    font-size: clamp(1.75rem, 4.4vw, 3.5rem) !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    text-wrap: balance !important;
    overflow: visible !important;
    transform: none !important;
    translate: none !important;
    scale: 1 !important;
}
body#top.page-home .home-message__sparkles {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    pointer-events: none !important;
    transform: none !important;
}
/* Keep even the Events overlay below the message, without blocking its buttons. */
body#top.events-scroll-modal-open > .header-events-widget.is-expanded {
    z-index: 3000 !important;
    width: 100% !important;
}

body#top.page-home :is(.featured-showcase, .available-showcase) {
    position: relative !important;
    inset: auto !important;
    z-index: 0 !important;
    isolation: isolate;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    transform: none !important;
    translate: none !important;
}
body#top.page-home .featured-showcase {
    padding-top: 1.5rem !important;
}
body#top.page-home .featured-showcase__hero-kicker-space {
    display: none !important;
}
body#top.page-home .featured-showcase__hero {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 90rem !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto 1.5rem !important;
    padding: .5rem 0 !important;
    transform: none !important;
}
body#top.page-home .featured-showcase__hero-title {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: .1em 0 !important;
    font-size: clamp(2rem, 4.4vw, 4.75rem) !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    text-wrap: balance !important;
    overflow: visible !important;
    transform: none !important;
    translate: none !important;
    scale: 1 !important;
}
body#top.page-home .available-showcase .available-showcase__heading {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto 2rem !important;
    padding: .5rem 0 !important;
    overflow: visible !important;
    transform: none !important;
}
body#top.page-home .available-showcase .available-showcase__heading >
.available-showcase__eyebrow.featured-showcase__hero-title {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    text-align: center !important;
}
body#top.page-home .available-showcase .available-showcase__view-all {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    position: relative !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 2.75rem !important;
    margin: 0 !important;
    padding: .5rem 1rem !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    transform: none !important;
}
body#top.page-home :is(.featured-showcase__grid, .available-showcase__grid) {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transform: none !important;
    translate: none !important;
}
body#top.page-home :is(.featured-showcase__card, .available-showcase__card) {
    min-width: 0 !important;
}
body#top.page-home :is(.featured-showcase__portrait, .available-showcase__portrait) {
    overflow: visible !important;
}
body#top.page-home :is(.featured-showcase, .available-showcase)::before,
body#top.page-home :is(.featured-showcase, .available-showcase)::after {
    max-width: 100%;
    pointer-events: none;
}

/* Status copy has its own growing row above the portrait at every text size. */
body#top.page-home .available-showcase__portrait-shell {
    padding-top: 0 !important;
}
body#top.page-home .available-showcase__status {
    position: static !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 2.5em !important;
    height: auto !important;
    margin: 0 0 .25rem !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-wrap: balance !important;
    transform: none !important;
}

body#top .rescue-pet-card__actions :is(a, button) {
    min-height: 2.75rem;
    font-size: .875rem;
    line-height: 1.25;
}
