@use '../core' as *;

// General style guide
// ===============================================
.styleGuide {
    padding-top: 6rem;
    padding-bottom: 24rem;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin-top: 3em;
        margin-bottom: $spacing-size-2;
    }
}

// Layout
// ===============================================
.layoutExample {
    display: flex;
    flex-wrap: wrap;
    gap: var(--layout-gap);

    div {
        background-color: rgba(255, 0, 0, 0.1);
    }
}

// Spacing
// ===============================================
.spacingItem {
    display: flex;
    align-items: center;
    gap: $spacing-size-4;
    min-height: $spacing-size-8;

    div {
        height: $spacing-size-2;
        background-color: var(--color-brand-300);
    }
}

// Radii
// ===============================================
.radiiList {
    display: flex;
    flex-wrap: wrap;
    gap: var(--layout-gap);

    code {
        display: inline-block;
        margin-bottom: 16px;
    }
}

.radiiItem {
    width: 4rem;
    height: 4rem;
    background-color: var(--color-brand-300);
}

// Text Sizes
// ===============================================
.textSizeList {
    display: flex;
    gap: 2rem;
}

.textSizeItem {
    margin-bottom: 1rem;
}

.textSizeExample {
    max-width: 440px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

// Color
// ===============================================
.swatch {
    width: 12rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-primary);
    overflow: hidden;
}

.swatchTop {
    height: 4rem;
}

.swatchBottom {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.25rem;
}

.colorsList {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

// Shadows
// ===============================================
.shadowsList {
    display: flex;
    gap: $spacing-size-8;

    div {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: $spacing-size-32;
        aspect-ratio: 1/1;
        border-radius: 8px;
    }
}

// Text Elements
// ===============================================
.textElementsList {
    display: flex;
    flex-wrap: wrap;

    p {
        min-width: 20%;
    }
}

.textElementsItem {
    margin-top: $spacing-size-8;
    margin-bottom: $spacing-size-8;

    code {
        display: inline-block;
        margin-bottom: $spacing-size-2;
    }
}

// Buttons
// ===============================================
.buttonExamples {
    display: flex;
    gap: $spacing-size-8;
    align-items: center;
    margin-bottom: $spacing-size-8;

    label {
        min-width: 100px;
        text-align: right;
    }
}

// Inputs
// ===============================================
.inputsOuter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--layout-gap);
}

.textInput {
    display: flex;
    flex-wrap: wrap;
    gap: var(--layout-gap);
}

.textInputGroup,
.textInputGroupStacked {
    display: flex;
    flex-direction: column;
    gap: $spacing-size-3;

    code {
        width: fit-content;
    }
}

.textInputGroupStacked .textInput {
    flex-direction: column;
    gap: $spacing-size-3;
}

.inputsList,
.checkboxList,
.radioList,
.switchList,
.selectList {
    div {
        display: flex;
        align-items: center;
        margin-bottom: $spacing-size-4;
        min-height: $spacing-size-12;
    }

    label {
        display: inline-block;
        min-width: 100px;
        text-align: right;
    }

    input {
        top: unset; // Fix for existing odd behavior.
    }
}

// Icons
// ===============================================
.iconsList {
    display: flex;
    flex-wrap: wrap;
    gap: $spacing-size-8;
    justify-content: center;
    margin-top: $spacing-size-8;
    margin-bottom: $spacing-size-16;

    > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: $spacing-size-2;
    }
}

.iconsElementsList {
    display: flex;
    flex-wrap: wrap;
    gap: $spacing-size-8;
    align-items: center;
    margin-top: $spacing-size-8;
    margin-bottom: $spacing-size-8;
}

.iconsSpan {
    --icon-color: red;

    color: red;
}

.iconsButton {
    --icon-color: white;

    background-color: blue;
    color: white;

    &:hover {
        background-color: green;
        color: white;
    }
}

.iconsLink {
    --icon-color: green;

    color: green;

    &:hover {
        --icon-color: orange;

        color: orange;
    }
}
