@use '../02-tokens/dimensions-semantic' as dimensions-semantic;

// CONTAINERS
.eds-u-flex {
    align-items: center !important;
    display: flex !important;
    width: 100% !important;
}

.eds-u-flex-column {
    display: flex !important;
    flex-direction: column !important;
}

.eds-u-inline-flex {
    align-items: center !important;
    display: inline-flex !important;
}

// Replacement of d-flex
.eds-u-display-flex,
.eds-u-d-flex {
    display: flex !important;
}

.eds-u-display-inline-flex,
.eds-u-d-inline-flex {
    display: inline-flex !important;
}

// JUSTIFY content
.eds-u-flex-justify-content-start {
    justify-content: flex-start !important;
}

.eds-u-flex-justify-content-end {
    justify-content: flex-end !important;
}

.eds-u-flex-justify-content-center {
    justify-content: center !important;
}

.eds-u-flex-justify-content-around {
    justify-content: space-around !important;
}

.eds-u-flex-justify-content-between {
    justify-content: space-between !important;
}

.eds-u-flex-justify-content-evenly {
    justify-content: space-evenly !important;
}

// ITEMS alignements
.eds-u-flex-align-items-start {
    align-items: flex-start !important;
}

.eds-u-flex-align-items-center {
    align-items: center !important;
}
.eds-u-flex-align-items-end {
    align-items: flex-end !important;
}

.eds-u-flex-align-items-stretch {
    align-items: stretch !important;
}

// DIRECTION layout
.eds-u-flex-row {
    flex-direction: row !important;
}

.eds-u-flex-row-reverse {
    flex-direction: row-reverse !important;
}

.eds-u-flex-column {
    flex-direction: column !important;
}

.eds-u-flex-column-reverse {
    flex-direction: column-reverse !important;
}

// VARIOUS
.eds-u-flex-wrap {
    flex-wrap: wrap !important;
}

.eds-u-flex-wrap-reverse {
    flex-wrap: wrap-reverse !important;
}

.eds-u-flex-nowrap {
    flex-wrap: nowrap !important;
}

.eds-u-flex-col {
    flex: 1 0 0% !important;
}

.eds-u-flex-grow {
    flex-grow: 1 !important;
}

.eds-u-flex-no-grow {
    flex-grow: 0 !important;
}

.eds-u-flex-shrink {
    flex-shrink: 1 !important;
}

.eds-u-flex-no-shrink {
    flex-shrink: 0 !important;
}

@each $spacing, $value in dimensions-semantic.$spacing-semantic-map {
    .eds-u-flex-gap-#{$spacing} {
        gap: var(--eds-sp-#{$spacing}) !important;
    }
}
