﻿#snackbar {
    visibility: hidden;
    min-width: 300px;
    background-color: #1F2933;
    color: #FFFFFF;
    text-align: center;
    border-radius: 5px;
    position: fixed;
    z-index: 200000 !important;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    font-size: 16px;
    overflow: hidden;
    direction: rtl;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}


.notify-progress {
    height: 4px;
    display: block;
    width: 100%;
    bottom: 0;
    animation: decreaseBorderWidth linear forwards;
}

/* Use a variable so JS can control duration */
#snackbar {
    --snack-time: 5000ms; /* default fallback */
}

/* Progress should follow snack time */
.successClass, .SuccessClass {
    background-color: #4CAF50;
    animation: decreaseBorderWidth var(--snack-time) linear forwards;
}

.errorClass, .ErrorClass {
    background-color: #F44336;
    animation: decreaseBorderWidth var(--snack-time) linear forwards;
}

.infoClass, .InfoClass {
    background-color: #2196F3;
    animation: decreaseBorderWidth var(--snack-time) linear forwards;
}

.massage-icon {
    margin-left: 8px;
    width: 24px;
    height: 24px;
}

@keyframes decreaseBorderWidth {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s calc(var(--snack-time) - 500ms);
    animation: fadein 0.5s, fadeout 0.5s calc(var(--snack-time) - 500ms);
}

/* 🎬 animate BOTTOM, not TOP */

@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 20px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 20px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 20px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 20px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

.highlight {
    border: 2px solid #dc3545 !important; /* bootstrap danger red */
    background-color: #fff5f5 !important; /* softer background */
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.5) !important;
    border-radius: 4px; /* match bootstrap form controls */
    transition: all 0.3s ease-in-out;
    animation: highlight-pulse 0.8s ease-in-out 2; /* pulse twice */
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 rgba(220,53,69,0.0);
    }

    50% {
        box-shadow: 0 0 12px rgba(220,53,69,0.8);
    }

    100% {
        box-shadow: 0 0 0 rgba(220,53,69,0.0);
    }
}


.required:after {
    content: " *";
    color: red;
    font-size: 16px;
}

.optional:after {
    content: " +";
    color: #0f6cbd;
    font-size: 16px;
}

.recommended:after {
    content: " +";
    color: #0f6cbd;
    font-size: 14px;
}
