.z-select-inner {
    height: 3.5rem;
    font-size: 1em;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 1em;

    .z-select-selected-option {
        margin-left: 1em;
    }
    >*:last-child {
        margin-right: 1.2em;
    }
}

.z-select.with-icon {
    .z-select-inner >*:first-child {
        margin-left: 0.5em;
    }
    .z-select-selected-option {
        margin-left: 0;
    }
}



.z-select-label {
    user-select: none;
}

.z-select[data-state="open"] {
    .z-select-dropdown-icon-poly.down {
        opacity: 0;
    }

    .z-select-dropdown-icon-poly.up {
        opacity: 1;
    }

    .z-select-dropdown-area {
        display: block;
        position: fixed;
        z-index: 20;
    }
}

.z-select[data-state="closed"] {
    .z-select-dropdown-icon-poly.down {
        opacity: 1;
    }

    .z-select-dropdown-icon-poly.up {
        opacity: 0;
    }

    .z-select-dropdown-area {
        display: none;
    }
}
.z-select {
    flex-grow: 1;
}
.z-select-dropdown-icon-poly {
    fill: rgba(0, 0, 0, 0.54);
    /* transition: opacity 100ms ease-in-out; */
}

.z-select-dropdown-icon {
    width: 0.7em;
    /* margin: 0 1.2em; */
}

.z-select-selected-option {
    flex-grow: 1;
    color: black;
}

.z-select-options {
    border-radius: 1em;
    box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.2);
    min-height: 2em;
    max-height: 100%;
    background-color: white;
    overflow-y: auto;
    padding: 0.5em 0;
    box-sizing: border-box;
}

.z-select-option {
    padding: 1em;
    cursor: pointer;
    color: black;
}

.z-select-option.active-option {
    color: var(--mdc-theme-primary);
    font-weight: 500;
    background-color: rgb(221, 221, 221);
}

.z-select-option:hover {
    background-color: rgb(235, 235, 235);
}

.z-select-option.disabled {
    cursor: unset;
    color: grey;
    /* font-style: italic; */
}

.z-select-option.disabled:hover {
    background-color: unset;
}

.z-select.disabled {
    color: rgb(172, 172, 172);

    .z-select-inner {
        cursor: unset;
    }

    .z-select-dropdown-icon-poly.down {
        opacity: 0.5;
    }

}


.z-select.filled {
    .z-select-inner {
        background-color: #f5f5f5;
        border-bottom: 1px solid grey;
        border-radius: 0.5rem 0.5rem 0 0;
        padding-bottom: 1px;
        transition: border-bottom 0.15s ease-in-out, padding-bottom 0.15s ease-in-out;
    }

    .z-select-inner:hover {
        background-color: #ececec;
        border-bottom: 1px solid #1e1e1e;
    }

    .z-select-label {
        position: absolute;
        top: calc(50% - 0.7em);
        left: 1rem;
        transition: font-size 0.15s ease-in-out, top 0.15s ease-in-out, color 0.15s;
    }

    .z-select-selected-option {
        position: relative;
        top: 0.5em;
    }

    .z-select-selected-option.no-label {
        top: 0;
    }
}

.z-select.with-icon[data-selected="false"][data-state="closed"] .z-select-label {
    left: 2.9em;
}

.z-select.filled[data-selected="true"] {
    .z-select-label {
        top: 0;
        font-size: 0.75em;
    }
}

.z-select.filled[data-state="open"] {
    .z-select-inner {
        padding-bottom: 0;
        border-bottom: 2px solid var(--mdc-theme-primary);
    }

    .z-select-label {
        top: 0;
        font-size: 0.75em;
        color: var(--mdc-theme-primary);
    }
}


.z-select.filled.disabled {

    .z-select-inner,
    .z-select-inner:hover {
        background-color: #fafafa;
        border-bottom: 1px solid #ebebeb;
    }
}

.z-select.outlined {
    margin-top: 0.5em;

    .z-select-inner {
        background-color: #ffffff;
        border: 1px solid #9e9e9e;
        border-radius: 0.5rem;
        padding: 1px;
        transition: border-bottom 0.15s ease-in-out, padding-bottom 0.15s ease-in-out;
    }

    .z-select-inner:hover {
        border: 1px solid #212121;
    }

    .z-select-label {
        position: absolute;
        top: calc(50% - 0.7em);
        left: 1rem;
        transition: 
            font-size 0.15s cubic-bezier(0.4, 0, 0.2, 1),
            color 150ms cubic-bezier(0.4, 0, 0.2, 1),
            left 150ms cubic-bezier(0.4, 0, 0.2, 1),
            top 150ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    .z-select-selected-option {
        pointer-events: none;
    }

    .z-select-selected-option.no-label {
        top: 0;
    }
}

.z-select.outlined[data-selected="true"],
.z-select.outlined[data-state="open"] {
    .z-select-label {
        /* transform: translateY(-30.25px) scale(1); */
        padding-left: 3px;
        padding-right: 3px;
        background-color: white;
        /* transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0s; */
        font-size: 0.75em;
        top: -1.1em;
        left: 0.8em;
    }

    .z-select-inner {
        padding: 0;
    }
}

.z-select.outlined[data-state="open"] {
    .z-select-inner {
        padding: 0;
        border: 2px solid var(--mdc-theme-primary);
    }

    .z-select-inner:hover {
        padding: 0;
        border: 2px solid var(--mdc-theme-primary);
    }

    .z-select-label {

        color: var(--mdc-theme-primary);
    }
}


.z-select.outlined.disabled {

    .z-select-inner,
    .z-select-inner:hover {
        background-color: #ffffff;
        color: rgba(0, 0, 0, 0.38);
        border: 1px solid rgba(0, 0, 0, 0.06);
    }
}


.z-select-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}