/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    pointer-events: none;
    max-width: 350px;
    width: 100%;

}

/* Toast Item */
.toast {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    pointer-events: all;
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease;
}

.toast.toast-removing {
    animation: slideOutRight 0.3s ease-out;
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Header */
.toast-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.03);
}

.toast-icon {
    font-size: 20px;
    margin-right: 10px;
}

.toast-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Toast Body */
.toast-body {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    animation: progress 3s linear;
    transform-origin: left;
}

/* Toast Types */
.toast-success .toast-header {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
}

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

.toast-success .toast-progress-bar {
    background: #28a745;
}

.toast-error .toast-header {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-error .toast-progress-bar {
    background: #dc3545;
    animation-duration: 5s;
}

.toast-warning .toast-header {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-warning .toast-progress-bar {
    background: #ffc107;
    animation-duration: 4s;
}

.toast-info .toast-header {
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-info .toast-progress-bar {
    background: #17a2b8;
}

.toast-default .toast-header {
    background: rgba(108, 117, 125, 0.1);
    color: #383d41;
}

.toast-default .toast-icon {
    color: #6c757d;
}

.toast-default .toast-progress-bar {
    background: #6c757d;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 10px;
    }
}

/*!* Dark Theme Support *!*/
/*@media (prefers-color-scheme: dark) {*/
/*    .toast {*/
/*        background: #2d3748;*/
/*        color: #e2e8f0;*/
/*    }*/
/*    */
/*    .toast-header {*/
/*        border-bottom-color: rgba(255, 255, 255, 0.1);*/
/*        background: rgba(255, 255, 255, 0.05);*/
/*    }*/
/*    */
/*    .toast-body {*/
/*        color: #e2e8f0;*/
/*    }*/
/*    */
/*    .toast-close {*/
/*        color: rgba(255, 255, 255, 0.5);*/
/*    }*/
/*    */
/*    .toast-close:hover {*/
/*        color: rgba(255, 255, 255, 0.8);*/
/*    }*/
/*    */
/*    .toast-progress {*/
/*        background: rgba(255, 255, 255, 0.1);*/
/*    }*/
/*}*/

.toast-icon-success::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
}

.toast-icon-error::before {
    content: "✕";
    color: #dc3545;
    font-weight: bold;
}

.toast-icon-warning::before {
    content: "⚠";
    color: #ffc107;
    font-weight: bold;
}

.toast-icon-info::before {
    content: "ℹ";
    color: #17a2b8;
    font-weight: bold;
}

.toast-icon-default::before {
    content: "🔔";
    color: #6c757d;
}