/* ==================================
   Modern Minimalist Notifications
   ================================== */

/* Override toastr default styles */
#toast-container > div {
    position: relative;
    pointer-events: auto;
    overflow: hidden;
    padding: 16px 20px 16px 54px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 
                0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 56px;
    width: 380px;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    animation: slideInDown 0.3s ease-out;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: initial !important;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

#toast-container > div:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 
                0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Toast types */
#toast-container > .toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%) !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    border-left: 4px solid #10b981;
}

#toast-container > .toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%) !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    border-left: 4px solid #ef4444;
}

#toast-container > .toast-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%) !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    border-left: 4px solid #3b82f6;
}

#toast-container > .toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%) !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    border-left: 4px solid #f59e0b;
}

/* Message text */
#toast-container > div .toast-message {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    z-index: 2;
}

/* Title text */
#toast-container > div .toast-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

/* Close button */
#toast-container > div .toast-close-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
    font-size: 20px;
    font-weight: 400;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.1);
    z-index: 3;
}

#toast-container > div .toast-close-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

/* Remove default icon */
#toast-container > div:before {
    display: none !important;
    content: none !important;
}

/* Ensure no background images on child elements */
#toast-container > div *,
#toast-container > div .toast-message,
#toast-container > div .toast-title {
    background-image: none !important;
    background-repeat: no-repeat !important;
}

/* Custom icon styles with SVG - positioned relative to toast container */
#toast-container > .toast-success:after,
#toast-container > .toast-error:after,
#toast-container > .toast-info:after,
#toast-container > .toast-warning:after {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background-size: 22px 22px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    flex-shrink: 0;
    z-index: 1;
    pointer-events: none;
}

#toast-container > .toast-success:after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
}

#toast-container > .toast-error:after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
}

#toast-container > .toast-info:after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>');
}

#toast-container > .toast-warning:after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>');
}

/* Progress bar */
#toast-container > div .toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

/* Container positioning */
#toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}

#toast-container.toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#toast-container.toast-top-right {
    top: 20px;
    right: 20px;
}

#toast-container.toast-top-left {
    top: 20px;
    left: 20px;
}

#toast-container.toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#toast-container.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

#toast-container.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    #toast-container > div {
        width: calc(100vw - 40px);
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
    
    #toast-container.toast-top-center,
    #toast-container.toast-bottom-center {
        left: 20px;
        right: 20px;
        transform: none;
        width: auto;
    }
}

/* Remove default toastr opacity */
#toast-container > :hover {
    opacity: 1;
    cursor: pointer;
}

/* Add subtle hover effect */
#toast-container > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#toast-container > div:hover {
    transform: translateY(-2px);
}

