/* --------------------------------

File#: _1_alert
Title: Alert
Descr: Feedback message
Usage: codyhouse.co/license

-------------------------------- */
/* reset
*, *::after, *::before {
    box-sizing: border-box;
}

* {
    font: inherit;
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    background-color: hsl(0 0% 100%);
    font-family: system-ui, sans-serif;
    color: hsl(230 7% 23%);
    font-size: 1rem;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    color: hsl(230 13% 9%);
    font-weight: 700;
}

h1 {
    font-size: 2.0736rem;
}

h2 {
    font-size: 1.728rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.2rem;
}

ol, ul, menu {
    list-style: none;
}

button, input, textarea, select {
    background-color: transparent;
    border-radius: 0;
    color: inherit;
    line-height: inherit;
    appearance: none;
}

textarea {
    resize: vertical;
    overflow: auto;
    vertical-align: top;
}

a {
    color: hsl(250 84% 54%);
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

@media (min-width: 64rem) {
    body {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 3.051rem;
    }

    h2 {
        font-size: 2.44rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1.5625rem;
    }
}
*/
/* variables */
:root {
    /* colors */
    --aj9-color-primary-hsl: 250, 84%, 54%;
    --aj9-color-bg-hsl: 0, 0%, 100%;
    --aj9-color-contrast-high-hsl: 230, 7%, 23%;
    --aj9-color-contrast-higher-hsl: 230, 13%, 9%;
    --aj9-color-success-hsl: 170, 78%, 36%;
    --aj9-color-warning-hsl: 35, 79%, 66%;
    --aj9-color-error-hsl: 342, 89%, 48%;
    --aj9-color-accent-hsl: 342, 89%, 48%;
    --aj9-color-contrast-lower-hsl: 240, 4%, 85%;

    /* spacing */
    --aj9-space-3xs: 0.25rem;
    --aj9-space-2xs: 0.375rem;
    --aj9-space-sm: 0.75rem;
    --aj9-space-md: 1.25rem;
    --aj9-space-xs: 0.5rem;

    /* typography */
    --aj9-text-sm: 0.833rem;
    --aj9-text-sm: 0.833rem;
}

@media(min-width: 64rem){
    :root {
        /* spacing */
        --aj9-space-3xs: 0.375rem;
        --aj9-space-2xs: 0.5625rem;
        --aj9-space-sm: 1.125rem;
        --aj9-space-md: 2rem;
        --aj9-space-xs: 0.75rem;

        /* typography */
        --aj9-text-sm: 1rem;
        --aj9-text-sm: 1rem;
    }
}

/* icons */
.aj9-icon {
    height: var(--aj9-size, 1em);
    width: var(--aj9-size, 1em);
    display: inline-block;
    color: inherit;
    fill: currentColor;
    line-height: 1;
    flex-shrink: 0;
    max-width: initial;
}

.aj9-icon--sm {
    --aj9-size: 24px;
}

/* component */
.alert {
    background-color: hsla(var(--aj9-color-primary-hsl), 0.2);
    color: hsl(var(--aj9-color-contrast-higher-hsl));
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
}

.alert__icon {
    color: hsl(var(--aj9-color-primary-hsl));
}

.alert__close-btn {
    display: inline-block;
    flex-shrink: 0;
    transition: 0.2s;
}
.alert__close-btn svg {
    display: block;
}
.alert__close-btn:hover {
    opacity: 0.7;
}

.alert--success {
    background-color: hsla(var(--aj9-color-success-hsl), 0.2);
}
.alert--success .alert__icon {
    color: hsl(var(--aj9-color-success-hsl));
}

.alert--error {
    background-color: hsla(var(--aj9-color-error-hsl), 0.2);
}
.alert--error .alert__icon {
    color: hsl(var(--aj9-color-error-hsl));
}

.alert--warning {
    background-color: hsla(var(--aj9-color-warning-hsl), 0.2);
}
.alert--warning .alert__icon {
    color: hsl(var(--aj9-color-warning-hsl));
}

.alert--is-visible {
    position: static;
    clip: auto;
    -webkit-clip-path: none;
    clip-path: none;
}

/* utility classes */
.aj9-margin-left-sm {
    margin-left: var(--aj9-space-sm);
}

.aj9-text-sm {
    font-size: var(--aj9-text-sm);
}

.aj9-margin-right-2xs {
    margin-right: var(--aj9-space-2xs);
}

.aj9-items-center {
    align-items: center;
}

.aj9-flex {
    display: flex;
}

.aj9-justify-between {
    justify-content: space-between;
}

.aj9-radius-md {
    border-radius: 0.25em;
}

.aj9-padding-sm {
    padding: var(--aj9-space-sm);
}

.aj9-color-inherit {
    color: inherit;
}

.aj9-text-component :where(h1, h2, h3, h4) {
    line-height: var(--aj9-heading-line-height, 1.2);
    margin-top: calc(var(--aj9-space-md) * var(--aj9-space-multiplier, 1));
    margin-bottom: calc(var(--aj9-space-sm) * var(--aj9-space-multiplier, 1));
}

.aj9-text-component :where(p, blockquote, ul li, ol li) {
    line-height: var(--aj9-body-line-height, 1.4);
}

.aj9-text-component :where(ul, ol, p, blockquote, .aj9-text-component__block) {
    margin-bottom: calc(var(--aj9-space-sm) * var(--aj9-space-multiplier, 1));
}

.aj9-text-component :where(ul, ol) {
    padding-left: 1.25em;
}

.aj9-text-component ul :where(ul, ol), .aj9-text-component ol :where(ul, ol) {
    padding-left: 1em;
    margin-bottom: 0;
}

.aj9-text-component ul {
    list-style-type: disc;
}

.aj9-text-component ol {
    list-style-type: decimal;
}

.aj9-text-component img {
    display: block;
    margin: 0 auto;
}

.aj9-text-component figcaption {
    margin-top: calc(var(--aj9-space-xs) * var(--aj9-space-multiplier, 1));
    font-size: var(--aj9-text-sm);
    text-align: center;}

.aj9-text-component em {
    font-style: italic;
}

.aj9-text-component strong {
    font-weight: bold;
}

.aj9-text-component s {
    text-decoration: line-through;
}

.aj9-text-component u {
    text-decoration: underline;
}

.aj9-text-component mark {
    background-color: hsla(var(--aj9-color-accent-hsl), 0.2);
    color: inherit;
}

.aj9-text-component blockquote {
    padding-left: 1em;
    border-left: 4px solid hsl(var(--aj9-color-contrast-lower-hsl));
    font-style: italic;
}

.aj9-text-component hr {
    margin: calc(var(--aj9-space-md) * var(--aj9-space-multiplier, 1)) auto;
    background: hsl(var(--aj9-color-contrast-lower-hsl));
    height: 1px;
}

.aj9-text-component > *:first-child {
    margin-top: 0;
}

.aj9-text-component > *:last-child {
    margin-bottom: 0;
}

.aj9-text-component.aj9-line-height-xs {
    --aj9-heading-line-height: 1;
    --aj9-body-line-height: 1.1;
}

.aj9-text-component.aj9-line-height-sm {
    --aj9-heading-line-height: 1.1;
    --aj9-body-line-height: 1.2;
}

.aj9-text-component.aj9-line-height-md {
    --aj9-heading-line-height: 1.15;
    --aj9-body-line-height: 1.4;
}

.aj9-text-component.aj9-line-height-lg {
    --aj9-heading-line-height: 1.22;
    --aj9-body-line-height: 1.58;
}

.aj9-text-component.aj9-line-height-xl {
    --aj9-heading-line-height: 1.3;
    --aj9-body-line-height: 1.72;
}

.aj9-margin-right-sm {
    margin-right: var(--aj9-space-sm);
}

.aj9-margin-top-3xs {
    margin-top: var(--aj9-space-3xs);
}

.aj9-opacity-70\% {
    opacity: 0.7;
}
