/**
 * Isolated AOI Program Finder Overrides and Additions
 * Package: AC_Templates
 */

/* ==========================================================================
   1. Disable Sticky & Fixed Positioning on AOI Pages
   ========================================================================== */
.aoi-program-finder #az-filter-summary-row,
.aoi-program-finder #az-list-column-headings,
.aoi-program-finder #az-filter-summary-row-float-placeholder,
.aoi-program-finder.floating-column-header,
.aoi-program-finder #az-list-column-headings.floating-column-header {
    position: static !important;
    top: auto !important;
}

.aoi-program-finder #az-filter-summary-row-float-placeholder {
    display: none !important;
    height: 0 !important;
}

/* ==========================================================================
   2. Filter Drawer & Accordion Expansions
   ========================================================================== */
.aoi-program-finder .az-filters-item-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.aoi-program-finder .az-filters-item-wrapper.az-visible {
    max-height: 2000px !important;
    overflow: visible !important;
    display: block !important;
}

.aoi-program-finder .az-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.aoi-program-finder .az-checkbox {
    width: 100%;
    display: flex;
    position: relative;
    align-items: center;
}

.aoi-program-finder .az-checkbox label.az-checkbox-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 40px;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.aoi-program-finder .az-checkbox-input {
    margin: 0 10px 0 2px;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    flex-shrink: 0;
}

.aoi-program-finder .az-checkbox-label {
    font-size: 1rem;
    color: #3b3b3b;
    line-height: 1.35;
}

/* ==========================================================================
   3. Show All / Show Fewer Control
   ========================================================================== */
.aoi-program-finder .az-show-all-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 36px 0 16px 0;
}

.aoi-program-finder .az-show-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    min-height: 48px;
    background-color: #006341;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 99, 65, 0.2);
}

.aoi-program-finder .az-show-all-btn:hover,
.aoi-program-finder .az-show-all-btn:focus-visible {
    background-color: #004f34;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 99, 65, 0.3);
}

/* ==========================================================================
   4. Visibility & Filter State
   ========================================================================== */
.aoi-program-finder .az-initial-hidden {
    display: none !important;
}

.aoi-program-finder .az-filtered-hidden {
    display: none !important;
}

/* ==========================================================================
   5. Filter Tag Pills in Toolbar
   ========================================================================== */
.aoi-program-finder .az-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #e6f0ec;
    border: 1px solid #c2ded3;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #006341;
    margin-right: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    line-height: 1.3;
    transition: all 0.15s ease;
}

.aoi-program-finder .az-filter-tag:hover {
    background-color: #d1e8df;
    border-color: #006341;
}

.aoi-program-finder .az-filter-tag .tag-close {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1;
    color: #004f34;
}

/* ==========================================================================
   6. Safe Non-clickable Items
   ========================================================================== */
.aoi-program-finder .az-each-prgm.aoi-program-no-link {
    cursor: default;
    pointer-events: none;
}
/* ==========================================================================
   7. Full-Width Listing & Column Redistribution
   ========================================================================== */
.aoi-program-finder,
.aoi-program-finder .az-prgms-inner-wrapper,
.aoi-program-finder #az-list-wrapper,
.aoi-program-finder .az-list-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.aoi-program-finder #az-list-wrapper,
.aoi-program-finder .az-list-wrapper {
    flex: 1 1 100% !important;
    display: block !important;
}

.aoi-program-finder #az-list-column-headings {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}

.aoi-program-finder .az-each-prgm {
    width: 100% !important;
    box-sizing: border-box !important;
}

.aoi-program-finder .az-each-prgm-info-wrap {
    width: 100% !important;
    box-sizing: border-box !important;
}

@media screen and (min-width: 881px) {
    /* Program Name / Left Column */
    .aoi-program-finder #az-list-column-headings .col-sort-text:nth-child(1) {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    .aoi-program-finder #az-list-column-headings .col-sort-text:nth-child(1) .heading-text {
        justify-content: flex-start !important;
        padding-left: 16px !important;
    }

    .aoi-program-finder .az-each-prgm-name {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        padding-left: 0 !important;
    }

    /* Info Columns Wrapper (Campus + Credential + Delivery = 510px) */
    .aoi-program-finder .az-each-prgm-info {
        flex: 0 0 510px !important;
        width: 510px !important;
        max-width: 510px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    /* Campus Column */
    .aoi-program-finder #az-list-column-headings .col-sort-text:nth-child(2) {
        flex: 0 0 145px !important;
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        text-align: center !important;
    }

    .aoi-program-finder .az-each-prgm-info span:nth-child(1) {
        flex: 0 0 145px !important;
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        text-align: center !important;
    }

    /* Credential Column */
    .aoi-program-finder #az-list-column-headings .col-sort-text:nth-child(3) {
        flex: 0 0 250px !important;
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
        text-align: center !important;
    }

    .aoi-program-finder .az-each-prgm-info span:nth-child(2) {
        flex: 0 0 250px !important;
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
        text-align: center !important;
    }

    /* Delivery Column */
    .aoi-program-finder #az-list-column-headings .col-sort-text:nth-child(4) {
        flex: 0 0 115px !important;
        width: 115px !important;
        min-width: 115px !important;
        max-width: 115px !important;
        text-align: center !important;
    }

    .aoi-program-finder .az-each-prgm-info span:nth-child(3) {
        flex: 0 0 115px !important;
        width: 115px !important;
        min-width: 115px !important;
        max-width: 115px !important;
        text-align: center !important;
    }
}
