/* Colour variables */

:root {
    --system-primary: #EAC33A;
    --system-secondary: #4F4C4C;
    --project-primary: #CAC4EB;
    --plots-primary: #DDB9CE;
    --habitatbank-primary: #93E2DE;
    --users-primary: #B2CBFF;

    --primary-default: #EAC33A;
    --primary-light: #f8dfa2;
    --primary-dark:  #A68206;
    --primary-content: #252427;

    --habitatbank-light: #D8F5F2;
    --habitatbank-dark:  #2DADAA;
    --habitatbank-compensation:  #f7f7f7;
}

* {
    scrollbar-color: var(--system-secondary) var(--habitatbank-light);
}




/* Centered divs */

.center {
    container-type: inline-size;
    width: 95%;
    max-width: 1440px;
    background: #FFF;
    padding: 2rem;
    border-radius: 14px;
    box-shadow:  0px 0px 10px 10px rgba(27, 53, 70, 0.03);
    margin: clamp(3em, 10vw, 5vh) auto;
    &:empty {
        display: none !important;
    }
}

.center--small {
    max-width: 960px;
}


/* two column split layouts */

.two__column__split {
    display: flex;
    gap: 1em;
    flex-direction: column;
    @container (width > 500px) {
        flex-direction: row;
        gap: 2cqw;
    }
    > * {
        padding: 1em;
        background-color: #e8e8e830;
        border: 1px solid #e8e8e8; 
        border-radius: 6px;
    }
    &.two__column__split--wrap {
        flex-wrap: wrap;
    }
}
.w-30 {
    flex-basis: 30%;
    flex-grow: 1;
}
.w-33 {
    flex-basis: 33.333%;
    flex-grow: 1;
}
.w-40 {
    flex-basis: 40%;
    flex-grow: 1;
}
.w-50 {
    flex-basis: 50%;
    flex-grow: 1;
}
.w-60 {
    flex-basis: 60%;
    flex-grow: 1;
}
.w-70 {
    flex-basis: 70%;
    flex-grow: 1;
}

/* set container query parent */

.inline__container {
    container-type: inline-size;
}

/* beeng heading styling */

.heading {
    font-weight: 700;
    letter-spacing: .025em;
    line-height: 1.55em;
    margin: 0 0 .5em;
    font-family: "Asap Condensed", sans-serif;
}


.error {
    background: rgb(164, 0, 0);
    color: #FFF;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}

/* buttons and forms */

#upload-gis-cvs {
    display: flex;
    align-items: center;
    input {
        padding: .5rem;
    }
}

button {
    padding: 0.45rem .8rem;
    border-radius: 8px;
    background: var(--habitatbank-dark);
    border: 2px solid var(--habitatbank-dark);
    color: #FFF;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .025em;
    transition: .3s ease;
    &:hover {
        color: var(--habitatbank-content);
        background-color: var(--habitatbank-light);;
        border-color: var(--habitatbank-content);
    }
}


input, select {
    min-height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    padding: 0 .75rem;
    &:hover {
        border-color: var(--habitatbank-primary);
    }
    &:active, &:focus {
        border-color: var(--habitatbank-dark)
    }
    &:disabled {
        opacity: .4;
    }
}
button, input, select {
    &[disabled] {
        opacity: .3;
        cursor: not-allowed;
    }
}

.form-input {
    margin: 0 0 1rem;
}
.form-input label {
    display: block;
    width: 100%;
    margin: 0 0 0.25rem 0;
}
.form-input label small {
    display: block;
}
.form-input input {
    display: block;
    width: 100%;
}


/* main header and menu */

header {
    background: var(--system-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__center {
    width: 95%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    @media (min-width: 600px) {
        flex-direction: row;
        justify-content: space-between;
    }
}
.header__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    gap: .6em;
    flex-shrink: 0;
    h1 {
        font-size: 1.3em;
        margin: 0;
        font-weight: 600;
    }
    a {
        display: block;
        width: clamp(60px, 20vw, 110px);
    }
    img {
        width: 100%;
        display: block;
    }
    span.highlight {
        font-family: Pacifico;
        color: var(--system-primary);
        font-size: 1.1em;
        font-weight: normal;
    }
}

/* nav */
.nav {
    @media (min-width: 600px) {
        flex-grow: 1;
    }
}
.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1.5em;
}
.nav li {
    padding: 0;
    text-indent: 0;
    list-style: none;
}
.nav li:before {
    display: none;
}
.nav li a {
    color: #FFF;
    width:90%;
    text-decoration: none;
    font-size: 1rem;
    transition: .2s ease;
    &:hover {
        color: var(--system-primary)
    }
}

a.link__reset {
    color: currentColor;
}

.list__reset {
    li {
        position: relative;
        margin: 0;
        padding: 0;
        text-indent: 0;
    }
    li:before {
        content: '';
        display: none;
    }
}


/* homepage and matchmaking */

.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 3em auto;
    width: 90%;
    max-width: 960px;
    p {
        text-align: center;
        width: 80%;
        font-size: 1.1em;
        line-height: 1.55;
        max-width: 700px;
    }
    strong {
        display: block;
        font-size: 1.2em;
        margin-bottom: .25em;
    }
}
.intro__logo {
    container-type: inline-size;
    position: relative;
    width: clamp(180px, 55%, 280px);
    text-align: center;
    margin-bottom: clamp(1em, 5vw, 3em);
    img {
        display: block;
        width: 100%;
        height: auto;
    }
    h1 {
        font-size: 1.6em;
        margin: .5em 0 0;
    }
    span.highlight {
        font-family: Pacifico;
        color: var(--system-primary);
        font-size: 1.1em;
        font-weight: normal;
    }
    @container (width > 220px) {
        h1 {
            position: absolute;
            left: clamp(70px, 32%, 250px);
            top: 73%;
            font-size: clamp(1.5em, 8cqw, 3em);
            margin: 0;
        }
    }
}

.landing__page__form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes dotPop {
    0%, 80%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    35% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    65% {
        opacity: 1;
        transform: scale(1);
    }
}

.loading__matchmaker {
    width: 90%;
    max-width: 890px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding: 1em;
    background-color: var(--system-secondary);
    color: var(--system-primary);
    font-size: 1.5em;
    border-radius: 12px;
    span {
        display: inline-block;
        opacity: 0;
        transform: scale(0);
        animation: dotPop 1.6s infinite ease-in-out both;
        width: 5px;
        height: 5px;
        margin-left: 5px;
        border-radius: 50%;
        background-color: currentColor;

    }
    span:nth-child(1) { animation-delay: 0s;   }
    span:nth-child(2) { animation-delay: 0.3s; }
    span:nth-child(3) { animation-delay: 0.6s; }
}

.heading.metric__results__header {
    font-size: 1.8em;
    margin: 0 0 2em;
    text-align: center;
}

.group__wrapper {
    margin-top: 4em;
    margin-bottom: 4em;
}

.group__wrapper.show--hectares {
    .unit__switch--hectares {
        display: inline;
    }
    .unit__switch--units {
        display: none;
    }
}
.group__wrapper.show--units {
    .unit__switch--units {
        display: inline;
    }
    .unit__switch--hectares {
        display: none;
    }
}
.group__heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2em;
    margin: 0;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #f3f3f3;
    @media (min-width: 600px) {
        flex-direction: row;
        justify-content: flex-end;
        gap: 3em;
    }
}

.group__control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    span {
        font-size: .875em;
    }
    span:nth-child(3) {
        font-weight: 400;
    }
}
.group__control__button {
    position: relative;
    width: 2.5rem;
    height: 1.5rem;
    border-radius: 3rem;
    background-color: var(--habitatbank-primary);
    overflow: hidden;
    cursor: pointer;
    transition: .3s ease;
    &:before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: .25rem;
        width: 1rem;
        height: 1rem;
        border-radius: 50%;
        background-color: #fff;
        margin: auto;
        transform: translateX(0);
        transition: inherit;
    }
    input {
        position: absolute;
        inset: 0;
        opacity: 0;
        z-index: 3;
        cursor: pointer;
    }
    
}
.group__control:has(input:checked) {
    .group__control__button {
        background-color: var(--habitatbank-dark);
        &:before {
            transform: translateX(1em);
        }
    }
    span:nth-child(1) {
        font-weight: 400;
    }
    span:nth-child(3) {
        font-weight: 700;
    }
}
.group__wrapper:has(input[data-state="basic"]) {
    .grid__cell[data-basic="0"],
    .grid__cell.advanced__item {
        display: none;
    }
    
    .grid__cell {
        font-size: .9em;
    }
    .group__control--units {
        display: none;
    }
}
.group__wrapper:has(input[data-state="basic"]),
.group__wrapper:has(input[data-state="advanced"]) {
    .grid__cell[data-cell="price"] {
        font-size: 1.1em;
    }
}

.results__wrapper {
    position: relative;
    overflow: auto;
}

.total__solution__price {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5em;
    margin: 2em 0 1em;
}
.total__solution__price__total {
    grid-column-end: -2;
    justify-content: flex-end;
    font-weight: 500;
    font-size: 1.1em;
}
.total__solution__price__price {
    grid-column-end: -1;
    font-weight: 700;
    font-size: 1.35em;
}

.unit__flex {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .65em;
    align-items: center;
    justify-content: center;
}


.missing__results {
    width: 100%;
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    margin: 1em 0 0;
}

.missing__results__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 1em 1em;
    @media (min-width: 600px) {
        flex-direction: row;
        justify-content: space-between;

    }
    p {
        margin: 0;
    }
    p:nth-child(1) {
        flex-grow: 1;
    }
    p:nth-child(2) {
        display: none;
    }
    p:nth-child(3) {
        flex-shrink: 0;
    }
    p:nth-child(3) {
        margin-left: 5vw;
        font-weight: 600;
        font-size: 1.15em;
        strong {
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }
    }
}

.missing__results__row--total {
    font-weight: 700;
    font-family: 'Asap Condensed';
    font-size: 1.55em;
    padding: 0;
    margin: 0 0 1em
}

.generators {
    display: flex;
    justify-content: flex-end;
    gap: .8em;
    > button {
        border-color: var(--habitatbank-primary);
        color: var(--habitatbank-dark);
        background-color: transparent;
    }
    > button:hover {
        border-color: var(--habitatbank-primary);
        background-color: var(--habitatbank-primary);
        color: var(--primary-content);
    }
}

.generator-container {
    border: 1px solid #ccc;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: .5em;
    width: 100%;
    flex-wrap: wrap;

}
.generator-container input, 
.generator-container select {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    max-width: 260px;
    width: 100%;
    
    
}
.generator-container button.generate {
    background-color: #128e12;
    color: #fff;
    border-color: #128e12;
    &:hover {
        background-color: #0abb0a;
    }
}

/* Metric Output */

#metric-table {
    display: none;
}
.metric-row {
    background: #eee;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem;
}
.metric-row-cell * {
    display: inline;
}
.metric-row-cell h3 {
    font-weight: 700;
}


/* habitat page grid */

.habitat__list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5em;
    .habitat__bank {
        width: 100%;
        padding: .5em;
        display: flex;
        flex-direction: column;
        gap: 0;
        @container (width > 600px) {
            width: clamp(200px, 50%, 50cqw);
        }
        @container (width > 1200px) {
            width: clamp(200px, 33.333%, 33cqw);
        }
        &.saved a {
            background-color: var(--habitatbank-light);
            transition-duration: 0.2s;
        }
        a {
            display: flex;
            flex-direction: column;
            gap: .5em;
            padding: 1em;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-shadow: 0 0 0px 0 rgba(0,0,0, 0.2);
            transition: .5s ease;
            @container (width > 300px) {
                padding: 1.5em;
                height: 100%;
            }
            &:hover {
                box-shadow: 0 0 8px 0 rgba(0,0,0, 0.4);
                border-color: var(--habitatbank-primary);
                text-decoration: none;
            }
        }
    }
}

.list__detail__edit {
    margin: 1em 0 3em;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35em;
    flex-wrap: wrap;
}

.list__detail {
    display: flex;
    flex-direction: column;
    transition: .5s ease;
    .list__detail__label {
        display: block;
        font-size: .675em;
        letter-spacing: 0.05em;;
        font-weight: 700;
        text-transform: uppercase;
        color: #555;
    }
    .list__detail__value {
        font-size: 1.1em;
        font-weight: 600;
        color: var(--system-secondary);
        margin: 0;
    }
    h2.list__detail__value {
        font-size: 1.5em;
        font-weight: 800;
        
    }
    input, select {
        width: 100%;
    }
}

.list__detail.updated {
    background-color: var(--habitatbank-light) !important;
    transition-duration: 0.2s;
}
.list__detail__units {
    display: flex;
    align-items: center;
    justify-content: stretch;
    flex-direction: column;
    gap: .5em;
    margin-top: .75em;
    @container (width > 400px) {
        flex-direction: row;
    }
    .list__detail {
        width: 100%;
        padding: 0.5em;
        background-color: #fbfbfb;
        border: 1px solid #bbb;
        justify-content: space-between;
        align-items: center;
        border-radius: 10px;
        @container (width > 400px) {
            width: 30%;
            flex-shrink: 0;
        }
        .list__detail__label {
            font-size: .6em;
        }
        .list__detail__value {
            font-size: 1.5em;
            font-weight: 800;
            color: var(--habitatbank-dark)
        }
    }
}


/* habitat bank single item page */

.habitatbank__single {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-width: 100%;
    overflow: hidden;
}
.habitatbank__single__unitgrid {
    margin-bottom: 3em;
}

.habitatbank__single__detail {
    .habitatbank__single__detail__label {
        display: block;
        font-size: .675em;
        letter-spacing: 0.05em;;
        font-weight: 700;
        text-transform: uppercase;
        color: #555;
    }
    .habitatbank__single__detail__value {
        font-size: 1.1em;
        font-weight: 600;
    }
}

.habitatbank__single__units {
    width: 100%;
    overflow: auto;
}


/* base grid set up */

.grid {
    display:grid;
    grid-template-columns:repeat(var(--cols),minmax(0,1fr));
    margin-bottom: .75em;
    &.unit__grid {
        grid-template-columns: 4fr 2fr 2fr 1fr 1fr 2fr;
        min-width: 900px;
        font-size: clamp(14px, 1.5cqw, 20px);
    }
    &.metric__resuls__table {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    }
}

.grid__row {
    display: contents;
}

.grid__cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: .5rem 1em;
    border:1px solid #ddd;
    font-size: .75em;
    transition: .5s ease;
    &:has(input),
    &:has(select) {
        padding: 5px;
        background-color: #e2dae8;
    }
    input, select {
        width: 100%;
    }
    &.grid__cell--error {
        background-color: #e46d7f;
        transition-duration: 0.2s;
    }
    &[data-cell="target_deficit"] {
        gap: .3em;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
    &[data-key="units_available"] {
        text-align: right;
        font-weight: 700;
        font-size: 1em;
    }
    &[data-cell="price"] {
        text-align: right;
        font-weight: 700;
    }
    &[data-cell="units"] {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        strong {
            display: block;
        }
    }
    &[data-cell="target_areas"],
    &[data-cell="compensation_areas"] {
        padding: 5px;
        gap: 5px;
    }
    
    
}


.grid__row.saved .grid__cell[data-key] {
    background-color: var(--habitatbank-light);
    transition-duration: 0.2s;
}
.grid--results {
    min-width: 850px;
}

.grid--results .grid__row--head {
    font-size: 1.15em;
    .grid__cell {
        padding: 1em;
    }
}

.grid__row--head .grid__cell {
    display: flex;
    font-weight: 600;
    background: var(--habitatbank-light);
    align-items: center;
    line-height: 1.1;
}
.grid__cell.grid__cell--edit {
    display: flex;
    padding: 0 .5em;
    align-items: center;
    justify-content: end;
    gap: 5px;
    border: 0;
    background-color: transparent;
}

/* action buttons  */
button.edit__item, button.save__item, button.delete__item, button.transaction__item__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35em;
    border: 2px solid currentColor;
    background-color: transparent;
    font-weight: 600;
    outline: 0;
    transition: .2s ease;
    
}
button.edit__item, button.transaction__item__button {
    color: var(--system-secondary);
    &:hover {
        background-color: var(--habitatbank-dark);
        border-color: var(--habitatbank-dark);
        color: #fff;
    }
}
button.save__item {
    color: #128e12;
    &:hover {
        background-color: #128e12;
        border-color: #128e12;
        color: #fff;
    }
}
button.complete__item, button.confirm__complete {
    background-color: #128e12;
    color: #fff;
    border-color: #128e12;
    &:hover {
        background-color: #0abb0a;
    }
}
button.cancel__item, button.delete__item, button.cancel__complete {
    color: #9d4444;
    background-color: transparent;
    border-color: #9d4444;
    &:hover {
        background-color: #9d4444;
        border-color: #9d4444;
        color: #fff;
    }
}

.habitatbank__single__add,
.habitat__bank__add {
    display: flex;
    justify-content: flex-end;
}
.habitat__bank__add {
    margin-top: 3em;
    button {
        outline: none
    }
}


/* transactions */

.transaction__heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2em;
    margin-bottom: 2em;
    h1 {
        margin: 0;
    }
    @media all and (min-width: 600px) {
        flex-direction: row;
        justify-content: space-between;
    }
}

.dropdown__container {
    margin-bottom: 1em;
    font-size: clamp(15px, 1.5cqw, 1.15em);
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 0 0px 0 rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: .5s ease;
    &:hover,
    &[open] {
        box-shadow: 0 0 8px 0 rgba(0,0,0, 0.4);
        border-color: var(--habitatbank-primary);
        text-decoration: none;
    }  
}

.transaction__list__item {
    transition: 1s ease .3s;
    
    .dropdown__summary {
        display: flex;
        flex-direction: column;
    }
    .dropdown__summary__grid {
        display: flex;
        flex-direction: column;
        gap: .5em;
        padding: 1em;        
        @container (width > 700px) {
            display: grid;
            grid-template-columns: repeat(11, 1fr);
            grid-template-rows: repeat(1, 1fr);
            gap: 3cqw;
        }
    }
    .list__detail__value {
        font-size: .85em;
    }
    .list__detail__edit {
        margin: 1em 0 0;
        @container (width > 700px) {
            flex-grow: 1;
            align-items: center;
            justify-content: flex-end;
            margin: 0;
        }
    }
    [data-column="name"] {
        grid-column: span 3;
        h2 {
            font-size: 1.3em;
        }
    }
    [data-column="status"] {
        grid-column-start: 4;
        .status--pending {
            color: #d97706;
            font-weight: 700;
            font-size: 1.05em;
        }
        .status--complete {
            color: #16a34a;
            font-weight: 700; 
            font-size: 1.05em;  
        }
        .status--invalid {
            color: #9d4444;
            font-weight: 700; 
            font-size: 1.05em;
        }      
    }
    [data-column="date"] {
        grid-column-start: 5;
    }
    [data-column="comment"] {
        grid-column: span 3;
    }
    [data-column="edit"] {
        grid-column: span 3;
    }
    &.edit__mode {
        [data-column="comment"] {
            grid-column: span 5;
        }
        [data-column="edit"] {
            grid-column-start: 1;
            grid-row-start: 2;
            width: 100%;
            grid-column-end: 12;
        }

    }
    &.saved {
        background-color: rgba(161, 250, 161, 0.175);
        transition-duration: 0.2s;
        transition-delay: 0s;
    }
}

.transaction__grid {
    margin-bottom: 1em;
    grid-template-columns: 0.5fr 2fr 1fr 3fr 1fr .5fr 2fr 2fr 1.5fr;
    padding: 0 .5em;
    overflow: auto;
    .grid__row[data-compensation="true"] {
        .grid__cell {
            background-color: #f8f8f8;
        }
    }
    .grid__cell[data-habitat="is_compensation"] {
        justify-content: center;
        
    }
    .grid__cell[data-habitat="quantity"] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        button {
            background-color: transparent;
            color: var(--primary-content);
            width: 30px;
            height: 30px;
            padding: 0;
            border-color: var(--primary-content)
        }
        &:has(input) {
            flex-wrap: nowrap;
            gap: .3em;
        }
        input {
            min-width: 100px;
        }
        label {
            font-weight: 700;
            font-size: .85em;
            letter-spacing: .01em;
            flex-shrink: 0;
            min-width: 50px;
        }
        &.over__max {
            background-color: #fea7ae;
        }
    }
    p.grid__cell.empty {
        grid-column: 1 / -1;
        text-align: center;
        padding: 1em;
    }
    .grid__row--footer {
        font-weight: 700;
        font-size: 1.2em;
        .grid__cell:nth-child(1) {
            grid-column-start: 8;
            justify-content: flex-end;
        }
        .grid__cell:nth-child(2) {
            grid-column-start: 9;
            justify-content: flex-end;
            letter-spacing: .05em;
        }
    }
}

.transaction__add {
    padding: 0 0.5em;
    display: flex;
    justify-content: flex-end;
}


p.empty {
    padding: 0 1em;
}

.transaction__row__new {
    padding: 0 .5em;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(1, 1fr);
    gap: 8px;
    margin: 5px 0;
    select {
        width: 100%;
    }
}

.grid__row.mark__for__delete {
    opacity: .75;
    .grid__cell {
        text-decoration: line-through;
        background-color: #eee;
    }
}

/* modal */

.complete__modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear .3s, opacity .3s ease;
    &.open {
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }
    
}

#modalInner {
    &.initial {
        .modal__header {
            opacity: 1;
            transition-delay: .1s;
        }
    }
    &.complete {
        .modal__issues, .modal__actions {
            opacity: 1;
            transition-delay: .3s;
        }
    }
}

.modal__background {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.modal__header, .modal__issues, .modal__actions {
    opacity: 0;
    transition: .3s ease;
}

.modal__header {
    text-align: center;
}

.modal__content {
    position: relative;
    width: min(90vw, 700px);
    background-color: white;
    padding: 4em 1em 2em 2em;
    z-index: 2;
    border-radius: 12px;
    box-shadow: 0 0 15px 5px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow: hidden;
    
}

button#modalClose {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalInner {
    position: relative;
    min-height: 100px;
    max-height: 70vh;
    padding-right: 1em;
    overflow-y: auto;
    .loading__matchmaker {
        background-color: transparent;
        color: var(--habitatbank-dark);
    }
    p {
        text-align: center;
    }
}
.modal__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2em 0;
    gap: 2em;
}
.list__detail__units--results {
    margin: 2em 0;
    justify-content: center;
}

.grid.grid__results {
    margin-bottom: 2.5em;
    .grid__row--head {
        .grid__cell:nth-child(1) {
            grid-column: span 5 / span 5;
            font-size: 1.15em;
            font-weight: 700;
        }
        
    }
    .grid__row:not(.grid__row--head) {
        .grid__cell:nth-child(3n+1) {
            grid-column: span 3 / span 3;
        }
        .grid__cell:nth-child(3n+2) {
            grid-column-start: 4;
        }
        .grid__cell:nth-child(3n+3) {
            grid-column-start: 5;
            background-color: #ff0e0e35;
            
        }
        .grid__cell:nth-child(3n+2),
        .grid__cell:nth-child(3n+3) {
            align-items: end;
            flex-direction: column;
            font-size: 1.1em;
            font-weight: 500;
            text-align: right;
            span {
                display: block;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: .05em;
                font-size: 8px;
            }
        }
    }
}
.grid.grid__results.grid__results--postdelete {
    .grid__row:not(.grid__row--head) {
        .grid__cell:nth-child(3n+3) {
            background-color: #06ba0625;
            
        }
    }
}
#issueCount {
    color: #ff0000;
}

#passedCount {
    color: #128e12;
}

.completetion__error {
    padding: 1.5em;
    font-size: 1.2em;
    text-align: center;
    border-radius: 10px;
    color: #a23939;
}

.modal__success {
    text-align: center;
    font-size: 1.15em;
    span.success {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.35em;
        aspect-ratio: 1 / 1;
        font-size: 3em;
        line-height: 1;
        background-color: #128e12;
        color: white;
        border-radius: 50%;
        position: relative;
        margin-bottom: .3em;


    }
}

