:root {
    --alert-bg-error-background: #fd5656;
    --alert-text-error: #721c24;
    --alert-title-error: #86141e;
    --alert-bg-warning-background: #ffd56c;
    --alert-text-warning: #856404;
    --alert-title-warning: #6b5207;
    --alert-bg-success-background: #55e46d;
    --alert-text-success: #155724;
    --alert-title-success: #0c4123;
    --alert-bg-info-background: #55d3e4;
    --alert-text-info: #0c5460;
    --alert-title-info: #0a4752;
}

.alert-custom {
    position: relative;
    border: none;
    border-left: 5px solid;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    /* content + close button separate */

    /* Animation Defaults */
    opacity: 0;
    transform: translateY(-15px);
    animation: fadeSlideIn 0.6s ease forwards;
}

/* Left side: icon + text ko flex mein rakha */
.alert-content {
    display: flex;
    flex-direction: column;
    margin-left: 0.75rem;
    flex: 1;
    /* message full width le sake */
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}

.alert-message {
    font-size: 0.95rem;
}

/* Icon style */
.alert-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    color: inherit;

    transform: scale(0);
    animation: popIn 0.5s ease forwards 0.3s;
}

/* Bootstrap close button alignment */
.alert .btn-close {
    margin-left: 1rem;
}

/* Animations */
@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    to {
        transform: scale(1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

/* Variants */
.alert-success {
    background-color: var(--alert-bg-success-background);
    color: var(--alert-text-success);
}

.alert-success .alert-title {
    color: var(--alert-title-success);
}

.alert-error {
    background-color: var(--alert-bg-error-background);
    color: var(--alert-text-error);
    animation: fadeSlideIn 0.6s ease forwards, shake 0.4s ease-in-out 0.6s;
}

.alert-error .alert-title {
    color: var(--alert-title-error);
}

.alert-warning {
    background-color: var(--alert-bg-warning-background);
    color: var(--alert-text-warning);
}

.alert-warning .alert-title {
    color: var(--alert-title-warning);
}

.alert-info {
    background-color: var(--alert-bg-info-background);
    color: var(--alert-text-info);
}

.alert-info .alert-title {
    color: var(--alert-title-info);
}