/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* container */

.hero__alerts {
    position: absolute;
    inset: 0;
    z-index: 10;

    width: 100%;
    height: fit-content;
    max-height: 1000px;

    padding: 25px 30px;
    background: var(--blue-dk);
    box-shadow: 0px 3px 6px #00000029;

    transition:
        max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease;
    overflow: hidden;
}

.hero__alerts.closed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.hero__alert {
    display: flex;
    gap: 26px;
    justify-content: start;
    align-items: start;
}

.hero__alerts__inner--slider .hero__alert {
    /* make room for splide arrows + close button */
    padding-right: 190px;
}

.hero__alerts__inner--static .hero__alert {
    /* make room for close button */
    padding-right: 60px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* icon */

.hero__alert__icon {
    margin-top: 24px;
}

.hero__alert__icon svg {
    font-size: 40px;
    color: var(--white);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* content */

.hero__alert__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero__alert__title {
    font-family: "Cachet";
    text-transform: uppercase;
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
}

.hero__alert__description {
    font-weight: 300;
    color: var(--white);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* splide arrows */

.hero__alerts .splide__arrows {
    position: absolute;
    right: 60px; /* offset to make room for close button */
    top: 0;

    height: 100%;

    padding: 4px;
    background: var(--blue-dk);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* close button */

.hero__alert__close {
    position: absolute;
    top: 0;
    right: 16px;
    height: 100%;
    width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--blue-dk);
    z-index: 10;
}

.hero__alert__close__button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.hero__alert__close__button:hover {
    transform: scale(1.1);
}

.hero__alert__close__button svg {
    font-size: 24px;
    color: var(--white);
}

.hero__alert__close__button:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: -4px;
}

@media (max-width: 768px) {
    /*alerts*/

    .hero__alerts {
        position: relative;
    }

    .hero__alerts__inner--slider .hero__alert,
    .hero__alerts__inner--static .hero__alert {
        /* make room for close button only */
        padding-right: 40px;
    }

    /*alert content*/

    .hero__alert__icon {
        display: none;
    }

    .hero__alert__title {
        font-size: 22px;
    }

    /* arrows */

    .hero__alerts__inner--slider {
        padding-bottom: 60px;
    }

    .hero__alerts .splide__arrows {
        top: unset;
        bottom: 0;
        right: unset;
        left: 0;
        height: fit-content;
    }

    /* close button */

    .hero__alert__close {
        margin-top: 26px;
        align-items: start;
    }
}
