/* ==================== Home Page ==================== */

.home-blurb {
    padding: 0 0 6px;
    background-color: var(--waterstons-blue-primary);
}

.home-projects-toolbar {
    padding: 3px 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.home-projects-title {
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    padding-right: 10px;
}

.home-projects-search {
    max-height: 2rem;
    width: fit-content;
}
    .home-projects-search .mud-input {
        width: 65%;
        margin-left: auto;
        height: 2rem;
    }

    .home-projects-search .mud-input-clear-button {
        inline-size: 0;
        width: fit-content;
        margin-left: -34px;
    }

    .home-projects-search .mud-input-control,
    .home-projects-search .mud-input-control > .mud-input-control-input-container,
    .home-projects-search .mud-input-outlined {
        background-color: var(--waterstons-white) !important;
        border-radius: 9999px !important;
        padding: 0 10px !important;
    }

    .home-projects-search .mud-input-outlined-border {
        border-color: transparent !important;
    }

    .home-projects-search input,
    .home-projects-search .mud-input-slot {
        color: var(--waterstons-blue-primary) !important;
        padding-right: 1.9rem !important;
    }

    .home-export-btn {
        flex-shrink: 0;
        margin-left: 0.35rem;
    }

    .home-projects-toolbar .mud-icon-button.mud-disabled {
        color: var(--waterstons-blue-secondary) !important;
        opacity: 0.5;
    }

.home-projects-main {
    border: 4px solid var(--waterstons-green);
    padding: 0 !important;
    border-radius: 15px !important;
    overflow: hidden;

    .mud-table-head .mud-table-cell {
        background-color: var(--waterstons-green) !important;
        pointer-events: none;
    }
}


.home-projects-table {
    position: relative;
    border-bottom-left-radius: 15px !important;
    border-bottom-right-radius: 15px !important;
}

.home-projects-table .mud-table-root {
    width: 100%;
    table-layout: fixed;
}

.home-projects-table .mud-table-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-projects-table .mud-table-cell:nth-child(1) { width: 10%; } /* Code */
.home-projects-table .mud-table-cell:nth-child(2) { width: 20%; } /* Project */
.home-projects-table .mud-table-cell:nth-child(3) { width: 20%; } /* Client */
.home-projects-table .mud-table-cell:nth-child(4) { width: 25%; } /* Author */
.home-projects-table .mud-table-cell:nth-child(5) { width: 12.5%; } /* Created */
.home-projects-table .mud-table-cell:nth-child(6) { width: 12.5%; } /* Ext. Review */

.home-projects-table .va-middle {
    vertical-align: middle;
}

.home-projects-table .external-review-status {
    display: flex;
    align-items: center;
    height: 1.3rem;
    gap: 0.25rem;
}

.home-projects-table .external-review-status .mud-tooltip-root {
    display: flex;
    align-items: center;
    height: 100%;
}

.home-projects-table .external-review-status .mud-icon-root {
    margin-right: 0;
}

.home-projects-table .external-review-status .mud-typography-caption {
    line-height: 1.3rem;
}

.home-projects-table .mud-table-row {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    padding-top: 20px !important;
}

.home-projects-table .mud-table-row:has(.td-project-name:hover) {
    transform: translateY(-1.5px);
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    z-index: 5;
}

/* Bottom row handling (hover / z-index / overflow) */
.home-projects-table .mud-table-body .mud-table-row:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}
.home-projects-table .mud-table-body .mud-table-row:last-child .mud-table-cell:first-child {
    border-bottom-left-radius: 10px;
}
.home-projects-table .mud-table-body .mud-table-row:last-child .mud-table-cell:last-child {
    border-bottom-right-radius: 10px;
}
/* --- */

.home-projects-footer {
    display: flex;
    justify-content: space-between;
    padding-left: 10px;
    height: 45px;
}

.home-projects-footer-left,
.home-projects-footer-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stacked-select {
    position: relative;
    display: grid;
    z-index: 1;
    min-width: 5rem;
}

.stacked-select--open {
    z-index: 20;
}

.stacked-select__trigger,
.stacked-select__option {
    width: 100%;
    box-sizing: border-box;
    color: var(--waterstons-white);
    font: inherit;
    font-size: var(--fs-5);
    text-align: left;
    cursor: pointer;
}

.stacked-select__trigger {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.85rem;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: var(--waterstons-blue-secondary);
}

.stacked-select__sizer {
    grid-area: 1 / 1;
    box-sizing: border-box;
    width: max-content;
    min-height: 1.85rem;
    padding: 4px 8px;
    font: inherit;
    font-size: var(--fs-5);
    white-space: nowrap;
    visibility: hidden;
}

.stacked-select__trigger:hover,
.stacked-select__trigger:focus-visible {
    border-color: rgba(255, 255, 255, 0.6);
    background: var(--waterstons-blue-primary);
    outline: none;
}

.stacked-select__options {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.45rem);
    display: flex;
    flex-direction: column;
    width: 100%;
    isolation: isolate;
}

.home-projects-footer-left .stacked-select__options {
    left: 0;
    right: auto;
}

.stacked-select__option {
    position: relative;
    z-index: var(--stack-order);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.1rem;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-radius: 5px;
    background: var(--waterstons-blue-secondary);
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(5, 20, 42, 0.32);
    transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.stacked-select__option + .stacked-select__option {
    margin-top: -0.3rem;
}

.stacked-select__option--selected {
    background: var(--waterstons-blue-primary);
}

.stacked-select__option:hover,
.stacked-select__option:focus-visible,
.stacked-select__option--active {
    z-index: 100;
    background: var(--waterstons-blue-primary);
    box-shadow: 0 8px 16px rgba(5, 20, 42, 0.5);
    transform: translateY(-2px);
}

.stacked-select__selected-mark {
    margin-left: 0.75rem;
    color: var(--waterstons-green);
    font-weight: 700;
}

.home-projects-footer-right {
    margin-left: auto;
}

.home-footer-label,
.home-footer-range {
    white-space: nowrap;
}

.home-footer-menu .mud-button-root,
.home-footer-trigger,
.home-projects-footer .mud-icon-button {
    color: var(--waterstons-white) !important;
}

.home-projects-footer .mud-icon-button.mud-disabled,
.home-projects-footer .mud-icon-button:disabled {
    color: var(--waterstons-blue-secondary) !important;
}

.home-footer-menu .mud-button-root {
    min-width: 0;
    padding-inline: 0.35rem;
}

.home-filter-menu .mud-popover-open {
    transform-origin: left top;
}

.home-rows-menu .mud-popover-open {
    transform-origin: right top;
}
