/* Toast Notifications - Sistema de notificações temporizadas */

#toast-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    pointer-events: none !important;
    max-width: calc(100% - 40px) !important;
    width: 100% !important;
    max-width: 400px !important;
}

#toast-container .toast {
    background: #fff !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
    padding: 10px 14px !important;
    display: table !important;
    width: auto !important;
    min-width: 260px !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    position: relative !important;
    overflow: visible !important;
    animation: toastSlideIn 0.3s ease-out !important;
    border-left: 3px solid !important;
    flex-basis: auto !important;
    height: auto !important;
}

#toast-container .toast.toast-success {
    border-left-color: #28a745 !important;
}

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

#toast-container .toast.toast-error {
    border-left-color: #dc3545 !important;
}

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

#toast-container .toast.toast-warning {
    border-left-color: #ffc107 !important;
}

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

#toast-container .toast.toast-info {
    border-left-color: #17a2b8 !important;
}

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

#toast-container .toast .toast-icon {
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

#toast-container .toast .toast-content {
    display: inline-block;
    vertical-align: middle;
}

#toast-container .toast .toast-title {
    font-weight: 600;
    font-size: 12px;
    margin: 0;
    color: #2c3e50;
}

#toast-container .toast .toast-message {
    font-size: 13px;
    color: #2c3e50;
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

#toast-container .toast .toast-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    transition: color 0.2s;
    margin-left: 8px;
    opacity: 0.6;
    line-height: 20px;
    text-align: center;
}

#toast-container .toast .toast-close:hover {
    color: #666;
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    width: 100%;
    transform-origin: left;
    animation: toastProgress linear;
}

.toast.toast-success .toast-progress {
    background: rgba(40, 167, 69, 0.3);
}

.toast.toast-error .toast-progress {
    background: rgba(220, 53, 69, 0.3);
}

.toast.toast-warning .toast-progress {
    background: rgba(255, 193, 7, 0.3);
}

.toast.toast-info .toast-progress {
    background: rgba(23, 162, 184, 0.3);
}

/* Animações */
@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

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

.toast.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* Responsividade Mobile */
@media (max-width: 576px) {
    #toast-container {
        bottom: 16px !important;
        right: 16px !important;
        left: 16px !important;
        top: auto !important;
        max-width: none !important;
        width: auto !important;
    }
    
    .toast {
        min-width: 0;
        width: 100%;
        padding: 10px 12px;
        display: block;
    }
    
    .toast-icon {
        font-size: 15px;
    }
    
    .toast-message {
        font-size: 13px;
        white-space: normal;
    }
    
    .toast-close {
        font-size: 16px;
        float: right;
        margin-left: 8px;
        margin-top: -2px;
    }
    
    @keyframes toastSlideIn {
        from {
            transform: translateY(100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes toastSlideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(100px);
            opacity: 0;
        }
    }
}

