/* Basic picocss alerts */

/*  https://docs.djangoproject.com/en/4.2/ref/contrib/messages/
DEBUG 	debug
INFO 	info
SUCCESS 	success
WARNING 	warning
ERROR 	error */

@keyframes slideInFromLeft {
    0% {
        opacity: 1;
        transform: translateX(100%);
    }
    10% {
        transform: translateX(0);
    }
    90% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.message-container {
    display: block; 
    position: fixed; /* Position fixed to the viewport */
    top: var(--pico-spacing); /* 10px from the top */
    right: var(--pico-spacing); /* 10px from the right */
}

.message {
    display: block; 
    padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal); /* same as forms .input */
    border-radius: var(--pico-border-radius);
    color: var(--pico-color-light);
    border: 1px solid; /* compensate for 1px border */
    /* padding-left: calc(var(--pico-form-element-spacing-vertical) * 2 + calc(var(--pico-font-size) *  1.5)); */
    position: relative; /* Position fixed to the viewport */
    
    margin-top: var(--pico-spacing); /* 10px from the right */;
    z-index: 9999; /* High z-index to appear above all other elements */
    max-width: 15vw;
    animation: 10s ease-out 0s 1 slideInFromLeft;
    visibility: hidden;
    opacity: 0;
}

.message::before {
    font-family: "Font Awesome 6 Free";
    font-weight: var(--pico-font-weight);
    margin-right: var(--pico-spacing); /* adjust as needed */
}

.message-debug {
    background-color: var(--pico-color-zinc-500);
}

.message-debug::before {
    content: "\f188"; /* This is the unicode for the bug icon in Font Awesome */
}

.message-info {
    background-color: var(--pico-color-blue-500);
}

.message-info::before {
    content: "\f05a"; /* This is the unicode for the info-circle icon in Font Awesome */
}

.message-success {
    background-color: var(--pico-color-green-500);
}

.message-success::before {
    content: "\f058"; /* This is the unicode for the check-circle icon in Font Awesome */
}

.message-warning {
    background-color: var(--pico-color-pumpkin-300);
}

.message-warning::before {
    content: "\f06a"; /* This is the unicode for the exclamation-triangle icon in Font Awesome */
}

.message-error {
    background-color: var(--pico-color-red-500);
}

.message-error::before {
    content: "\f057"; /* This is the unicode for the times-circle icon in Font Awesome */
}