/* St. Michael Catholic School - Important Dates box
   Outline 31 "School Home" (/school). Ticket SOL-30701.
   Keeps the "View Full Calendar & Daily Schedule" button pinned to the
   bottom of the box and scrolls a long date list inside it. */

/* Keep the rounded box from being broken by overflowing content */
.site-2-home .mass-times-block .g-array-item {
    overflow: hidden;
}

/* Box content becomes a column: title, scrolling dates, button */
.site-2-home .mass-times-block .g-array-item-text {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.site-2-home .mass-times-block .g-array-item-text > * {
    flex: 0 0 auto;
}

/* The date list is the scrolling area */
.site-2-home .mass-times-block .g-array-item-text > p:not(:has(> a.button)) {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color, #0a5c3e) rgba(0, 0, 0, .08);
}

.site-2-home .mass-times-block .g-array-item-text > p:not(:has(> a.button))::-webkit-scrollbar {
    width: 8px;
}

.site-2-home .mass-times-block .g-array-item-text > p:not(:has(> a.button))::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, .08);
    border-radius: 4px;
}

.site-2-home .mass-times-block .g-array-item-text > p:not(:has(> a.button))::-webkit-scrollbar-thumb {
    background: var(--primary-color, #0a5c3e);
    border-radius: 4px;
}

/* The paragraph holding the button sits at the bottom of the box */
.site-2-home .mass-times-block .g-array-item-text > p:has(> a.button) {
    flex: 0 0 auto;
    margin: auto 0 0 0;
    padding-top: .75rem;
}

/* Desktop: fill the fixed-height panel set by the slideshow row */
@media only screen and (min-width: 50.99rem) {
    .site-2-home .mass-times-block .g-array-item-text {
        height: 100%;
    }
}

/* Phone: cap the box height so the button stays reachable */
@media only screen and (max-width: 50.99rem) {
    .site-2-home .mass-times-block .g-array-item-text {
        max-height: 65vh;
    }
}
