/* ==========================================================================
   Modern Toastr Override — professional, animated toast notifications
   Loaded AFTER toastr.min.css; everything below uses higher specificity / !important
   ========================================================================== */

#toast-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    z-index: 999999 !important;
}

#toast-container.toast-top-right {
    top: 24px !important;
    right: 24px !important;
}

#toast-container > div {
    position: relative !important;
    width: auto !important;
    min-width: 320px !important;
    max-width: 420px !important;
    padding: 16px 44px 16px 64px !important;
    margin: 0 0 12px 0 !important;
    border-radius: 14px !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #1a202c !important;
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.15),
        0 8px 10px -6px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: toastrSlideIn 0.5s cubic-bezier(0.21, 1.02, 0.73, 1);
    transition: box-shadow 0.25s ease;
}

#toast-container > div:hover {
    box-shadow:
        0 20px 35px -10px rgba(0, 0, 0, 0.2),
        0 10px 15px -8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

/* Left accent stripe */
#toast-container > div::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 5px !important;
    border-radius: 14px 0 0 14px !important;
}

#toast-container > .toast-error::before { background: linear-gradient(180deg, #ff4757 0%, #c0392b 100%) !important; }
#toast-container > .toast-success::before { background: linear-gradient(180deg, #2ed573 0%, #1e9d55 100%) !important; }
#toast-container > .toast-warning::before { background: linear-gradient(180deg, #ffa502 0%, #e67e22 100%) !important; }
#toast-container > .toast-info::before { background: linear-gradient(180deg, #1e90ff 0%, #2980b9 100%) !important; }

/* Icon badge — circular gradient with SVG */
#toast-container > div::after {
    content: '' !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 22px 22px !important;
    animation: toastrIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both !important;
}

#toast-container > .toast-error::after {
    background-color: #ee2d3f !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/></svg>") !important;
    box-shadow: 0 4px 12px rgba(238, 45, 63, 0.45) !important;
}

#toast-container > .toast-success::after {
    background-color: #1ec969 !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/></svg>") !important;
    box-shadow: 0 4px 12px rgba(30, 201, 105, 0.45) !important;
}

#toast-container > .toast-warning::after {
    background-color: #ff8c00 !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/></svg>") !important;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.45) !important;
}

#toast-container > .toast-info::after {
    background-color: #1e7dd6 !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/></svg>") !important;
    box-shadow: 0 4px 12px rgba(30, 125, 214, 0.45) !important;
}

/* Title */
#toast-container > div > .toast-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 3px 0 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
}

/* Message */
#toast-container > div > .toast-message {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #4a5568 !important;
    margin: 0 !important;
    word-wrap: break-word !important;
}

/* Close button */
#toast-container > div > .toast-close-button {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
    border: none !important;
    background: transparent !important;
    color: #a0aec0 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    float: none !important;
    margin: 0 !important;
}

#toast-container > div > .toast-close-button:hover,
#toast-container > div > .toast-close-button:focus {
    background: #f1f3f5 !important;
    color: #2d3748 !important;
    opacity: 1 !important;
    transform: rotate(90deg) !important;
    outline: none !important;
}

/* Progress bar */
#toast-container > div > .toast-progress {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 3px !important;
    background: rgba(0, 0, 0, 0.05) !important;
    opacity: 1 !important;
    border-radius: 0 0 14px 14px !important;
}

#toast-container > .toast-error > .toast-progress { background: linear-gradient(90deg, #ff4757, #c0392b) !important; }
#toast-container > .toast-success > .toast-progress { background: linear-gradient(90deg, #2ed573, #1e9d55) !important; }
#toast-container > .toast-warning > .toast-progress { background: linear-gradient(90deg, #ffa502, #e67e22) !important; }
#toast-container > .toast-info > .toast-progress { background: linear-gradient(90deg, #1e90ff, #2980b9) !important; }

/* Animations */
@keyframes toastrSlideIn {
    0% { transform: translateX(120%) scale(0.85); opacity: 0; }
    60% { transform: translateX(-8px) scale(1.02); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}


@keyframes toastrIconPop {
    0% { transform: translateY(-50%) scale(0) rotate(-180deg); }
    100% { transform: translateY(-50%) scale(1) rotate(0deg); }
}

/* Responsive */
@media (max-width: 480px) {
    #toast-container.toast-top-right {
        top: 16px !important;
        right: 16px !important;
        left: 16px !important;
    }
    #toast-container > div {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
