@use  '../../assets/styles/effects' as *;

@mixin overflow-ellipsis() {
    overflow: hidden;
    text-overflow: ellipsis;
}

.uui-typography {
    font-family: var(--uui-font);
    color: var(--uui-text-primary);

    .hero-header, h1, h2, h3, h4, h5, h6 {
        margin: 0;
    }

    .hero-header {
        font-family: var(--uui-font);
        font-weight: 500;
        margin: 30px 0;
        font-size: 66px;
        line-height: 72px;
    }

    .promo-header, h1, h2, h3 {
        font-family: var(--uui-font);
        font-weight: 700;
    }

    h4, h5, h6 {
        font-family: var(--uui-font);
        font-weight: 600;
    }

    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.5em;
        margin-top: 1.2em;
        line-height: 1.35em;
    }

    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 30px;
        letter-spacing: 0.1px;

        .promo-header {
            letter-spacing: 2px;
        }
    }

    h3 {
        font-size: 24px;
    }

    h4 {
        font-size: 18px;
        letter-spacing: 0.1px;
    }

    h5 {
        font-size: 16px;
    }

    h6 {
        font-size: 14px;
    }

    b, strong {
        font-family: var(--uui-font);
        font-weight: 600;
    }

    i, em {
        font-family: var(--uui-font);
        font-weight: 400;
        font-style: italic;
    }

    a {
        display: inline-flex;
        align-items: center;
        color: var(--uui-link);
        text-decoration: underline;

        &:focus-visible {
            @include focus-visible-effect(2px);
            border-radius: var(--uui-focus-radius);
        }

        &:visited {
            color: var(--uui-link-visited);

            &:hover {
                color: var(--uui-link-visited-hover);
            }
        }

        &:hover {
            color: var(--uui-link-hover);
        }
    }

    code {
        padding: 0.125em 0.25em;
        color: var(--uui-text-primary);
        background-color: var(--uui-neutral-30);
        font-family: var(--uui-font-mono, monospace);
        font-weight: 400;
        white-space: pre-wrap;
        word-wrap: normal;
    }

    ol, ul {
        padding: 0;
    }

    li {
        margin-left: 1.25em;
        line-height: 1.5;
    }

    pre {
        padding: 1.25em;
        font-family: monospace;
        white-space: pre-wrap;
        word-wrap: normal;
    }

    img {
        max-width: 100%;
    }

    figure {
        margin: 0;

        figcaption {
            font-size: 0.9em;
            opacity: 0.9;
            text-align: center;
        }
    }

    p {
        margin: 0.5em 0;
        line-height: 1.5;
    }

    .uui-critical {
        color: var(--uui-text-critical);
    }

    .uui-info {
        color: var(--uui-text-info);
    }

    .uui-success {
        color: var(--uui-text-success);
    }

    .uui-warning {
        color: var(--uui-text-warning);
    }

    .uui-highlight {
        background-color: var(--uui-warning-10);
    }
}

.uui-typography-size-12 {
    font-size: 12px;
}

.uui-typography-size-14 {
    font-size: 14px;
}

.uui-typography-size-16 {
    font-size: 16px;
}
