/* =====================================================
   Toastify Base (Fixed Position – No Layout Shift)
   ===================================================== */
.toastify {
    position: fixed !important;
    z-index: 9999 !important;

    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;

    margin: 0 !important;
    transform: none !important;

    background: #ffffff;
    color: #dc3545;

    border-radius: 8px;
    border-left: 6px solid #dc3545;

    padding: 16px 44px 16px 56px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;

    min-width: 360px;
    max-width: 520px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: visible; /* IMPORTANT */
}

/* =====================================================
   Error Icon (Left)
   ===================================================== */
.toastify.toast-error::before {
    content: "⛔";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);

    font-size: 18px;
    color: #dc3545;
}

/* =====================================================
   Progress Bar (VISIBLE & STABLE)
   ===================================================== */
.toastify.toast-error::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;

    height: 3px;
    width: 100%;
    background-color: #dc3545;

    animation-name: toast-progress;
    animation-duration: 5s; /* MUST match JS duration */
    animation-timing-function: linear;
    animation-fill-mode: forwards;

    z-index: 1;
}

@keyframes toast-progress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* =====================================================
   Close Button
   ===================================================== */
.toastify .toast-close {
    position: absolute;
    top: 12px;
    right: 14px;

    font-size: 18px;
    cursor: pointer;

    opacity: 0.6;
    color: #dc3545;
}

.toastify .toast-close:hover {
    opacity: 1;
}

/* =====================================================
   Mobile Support
   ===================================================== */
@media (max-width: 480px) {
    .toastify {
        min-width: auto;
        max-width: calc(100% - 24px);
        padding: 14px 40px 14px 52px;
        font-size: 14px;
    }
}





/* =====================================================
   Success Toast
   ===================================================== */
.toastify.toast-success {
    background: #ffffff;
    color: #28a745;

    border-left: 6px solid #28a745;
}

.toastify.toast-success::before {
    content: "✅";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);

    font-size: 18px;
    color: #28a745;
}

.toastify.toast-success::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;

    height: 3px;
    width: 100%;
    background-color: #28a745;

    animation-name: toast-progress;
    animation-duration: 5s; /* MUST match JS duration */
    animation-timing-function: linear;
    animation-fill-mode: forwards;

    z-index: 1;
}

.toastify.toast-success .toast-close {
    color: #28a745;
}
