@use "variables";

.languages {
    p {
        text-align: center;
        margin: 0 0 5px;
        font-size: 18px;
        color: variables.$white;

        a {
            color: variables.$primary-color-dark;
        }
    }

    .languages-columns {
        display: flex;
    }

    .col-globe {
        flex: 1.07;
        margin-top: 30px;

        .globe {
            width: 90%;
            transform: translateX(-40px);
        }
    }

    .col-list {
        flex: 0.93;
        padding-top: 80px;
        line-height: 1.6;
        font-weight: 400;

        .continent-name {
            color: variables.$white;
            font-size: 22px;
            font-weight: 400;
            background: none;
            border: none;
            padding: 0;
            margin: 0;

            &:focus {
                outline: none;
            }

            &::after {
                content: "";
                display: inline-block;
                height: 0;
                width: 0;
                border: 6px solid transparent;
                border-left-color: variables.$white;
                transform: translateX(5px) translateY(-1px);
            }
        }

        li[style] {
            .continent-name {
                &::after {
                    border-left-color: transparent;
                    border-top-color: variables.$white;
                    transform: translateX(2px) translateY(2px);
                }
            }
        }

        .lang-code {
            display: inline-block;
            min-width: 30px;
            padding-right: 8px;
            opacity: 0.6;
            transition: opacity variables.$transition-duration;
        }

        .lang-name {
            transition: padding-left variables.$transition-duration;
        }

        a {
            color: variables.$primary-color-dark;
            transition: color variables.$transition-duration;

            &:hover {
                color: variables.$white;
                text-decoration: none;

                .lang-code {
                    opacity: 1;
                }

                .lang-name {
                    padding-left: 8px;
                }
            }
        }

        ul,
        li {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        > ul {
            padding-right: 50px;

            > li {
                overflow: hidden;
                transition: height variables.$transition-duration linear;

                &[data-height] {
                    height: 30px;
                }

                ul {
                    padding: 15px 0;
                    columns: 2;
                    line-height: 1.8;
                }
            }
        }
    }
}
