.alert {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: var(--form-component-padding);
    margin: 0;
    color: var(--alert-primary-text-color);
    border: 1px solid transparent;
    background-color: var(--alert-primary-background-color);
    border-color: var(--alert-primary-border-color);
}

.alert-text-inline {
    display: flex;
    align-items: center;
    padding: var(--form-component-padding);
    margin: 0;
}

.alert.alert-dismissible {
    padding-right: 48px !important;
}

.alert a:hover {
    text-decoration: none;
}

.alert .btn-close {
    display: flex;
    align-items: center;
    justify-content: center;
    top: 6px;
    right: 0px;
}

.alert i {
    font-size: 14px;
    margin-right: 6px;
}

.alert small {
    font-size: 14px;
}

.alert.alert-warning a:not(.btn.btn-primary),
.alert.alert-primary a:not(.btn.btn-primary) {
    font-weight: 700;
    padding: 0 6px 0 6px;
}

/* - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - Types - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - */

/* _________________ Primary _________________ */
.alert.alert-primary,
.alert.alert-warning {
    color: var(--alert-primary-text-color);
    background-color: var(--alert-primary-background-color);
    border-color: var(--alert-primary-border-color);
}

/* _________________ Success _________________ */
.alert.alert-success {
    color: var(--alert-success-text-color);
    background-color: var(--alert-success-background-color);
    border-color: var(--alert-success-border-color);
}

/* _________________ Danger _________________ */
.alert.alert-danger {
    color: var(--alert-danger-text-color);
    background-color: var(--alert-danger-background-color);
    border-color: var(--alert-danger-border-color);
}

/* _________________ Warning _________________ */

/* TASK: Right semantic component commented on 2.03v and properties combined with alert-primary.
Wait two versions and replace the class alert-waring for alert-primary in all files */

/* .alert.alert-warning {
    color: var(--alert-warning-text-color);
    background-color: var(--alert-warning-background-color);
    border-color: var(--alert-warning-border-color);
} */

.alert.alert-yellow {
    color: var(--yellow-04);
    background-color: var(--yellow-01);
    border-color: var(--yellow-04);
}

/* _________________ Questionnaire _________________ */
.alert.alert-questionnaire {
    color: var(--alert-questionnaire-text-color);
    background-color: var(--alert-questionnaire-background-color);
    border: var(--alert-questionnaire-border-color);
}

.alert.alert-questionnaire span.badge.badge-warning,
.alert.alert-questionnaire span.badge.badge-info {
    white-space: normal;
    font-weight: bold;
    color: var(--tertiary);
    background-color: transparent;
    padding: 0;
    font-size: 14px;
}

/* _________________ Alert Switch _________________ */
.alert-switch {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    right: 0;
    top: 50%;
    transform: translate(-50%, -50%);
}

.alert.alert-collapsible {
    position: absolute;
    top: 74px !important;
    right: 21px !important;
}

body.alert-top .alert.alert-collapsible {
    top: calc(74px + 62px) !important;
}

#expand-alert ~ .alert.alert-collapsible {
    width: calc(100% - 388px);
    z-index: 2;
}

.wdk-training-sidebar.modules[style='display: none;'] ~ .wdk-training-content #expand-alert:not(:checked) ~ .alert.alert-collapsible {
    width: calc(100% - 36px);
    z-index: 2;
}

#expand-alert ~ .alert.alert-collapsible .alert-msg {
    opacity: 1;
    width: 100%;
    transition-delay: 0s, 0.3s;
    transition-property: width, opacity;
}

#expand-alert ~ .alert.alert-collapsible .alert-switch .icon-close {
    font-size: 22px;
}

#expand-alert ~ .alert.alert-collapsible .alert-switch .icon-warning {
    display: none;
}

#expand-alert:checked ~ .alert.alert-collapsible {
    right: 8px;
    padding: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    transition: 0.3s;
    transition-delay: 0.1s;
}

#expand-alert:checked ~ .alert.alert-collapsible .alert-msg {
    overflow: hidden;
    opacity: 0;
    width: 0;
    transition: width 0s ease-in 0s, opacity 0.1s ease-in 0.3s;
}

#expand-alert:checked ~ .alert.alert-collapsible .alert-switch {
    right: initial;
    left: 50%;
}

:not(#expand-alert:checked) ~ .alert.alert-collapsible .alert-switch {
    right: -10px;
    top: 24px;
}

#expand-alert:checked ~ .alert.alert-collapsible .alert-switch .icon-close {
    display: none;
}

#expand-alert:checked ~ .alert.alert-collapsible .alert-switch .icon-warning {
    display: block;
    font-size: 22px;
    margin: 0;
}

/* Alert Inner - Incident */
.alert.alert-inner {
    position: fixed;
    right: 14px;
    justify-content: space-between;
    width: calc(100% - var(--sidebar-expanded-width) - 30px);
    padding: 0.5rem;
    border-radius: var(--radius-base);
    box-shadow: var(--box-shadow);
    transition: var(--time-01);
    z-index: 1999;
}

#sidebar-trigger:checked ~ .wdk-layout .alert.alert-inner {
    width: calc(100% - 90px);
    right: 14px;
    transition: 0.3s;
    transition-delay: 0.25s;
}

.alert.alert-inner.alert-top {
    top: 6px;
    z-index: 99999;
    width: 100% !important;
    right: 6px !important;
    border-radius: 0;
}

.alert.alert-inner.alert-bottom {
    bottom: 6px;
    z-index: 99999;
    width: 100% !important;
    right: 6px !important;
    border-radius: 0;
}

.alert.alert-inner.alert-top .alert-text,
.alert.alert-inner.alert-bottom .alert-text {
    max-height: 46px;
    overflow: hidden;
}

@media (max-width: 992px) {
    .alert.alert-inner {
        width: auto !important;
        left: 0;
        right: 0 !important;
        margin: 0 12px;
    }
    .alert.alert-inner.alert-top {
        top: 68px;
    }
}

@media (max-width: 768px) {
    #attemptAlert {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        margin: 0 auto !important;
        display: flex;
        justify-content: center;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .alert.alert-collapsible {
        position: relative !important;
        top: 7px !important;
        right: 0 !important;
        width: calc(100% - 12px) !important;
        margin: 0 auto !important;
        border-radius: 8px !important;
    }

    .alert-msg {
        font-size: 13px;
        text-align: center;
        line-height: 1.4;
        padding: 0 8px;
    }

    .alert-switch {
        top: 8px !important;
        right: 8px !important;
        transform: none !important;
    }

    .wdk-training-sidebar.modules[style="display: block;"] ~ .alert.alert-collapsible {
        display: none !important;
    }
}

/* External */
.alert.alert-external {
    position: fixed;
    align-items: center;
    justify-content: space-between;
    left: 0;
    width: 100%;
    padding: 10px;
    border-radius: 0;
    border-left-color: transparent;
    border-right-color: transparent;
    z-index: 7011;
}

body.alert-top .alert.alert-external {
    top: 0;
    border-top-color: transparent;
}

body.alert-bottom .alert.alert-external {
    bottom: 0;
    border-bottom-color: transparent;
}
