/**
 * Estilos para Sistema de Notificações Toast
 * EvovE Box Admin Panel
 */

/* Container de Toasts */
.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    padding: 1rem;
    max-width: 400px;
    width: 100%;
}

.toast-container.toast-top-right {
    top: 80px;
    right: 20px;
}

.toast-container.toast-top-left {
    top: 80px;
    left: 20px;
}

.toast-container.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Item de Toast */
.toast-item {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    overflow: hidden;
    min-width: 300px;
    max-width: 400px;
}

.toast-item.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-item.toast-leaving {
    opacity: 0;
    transform: translateX(100%);
    margin-bottom: 0;
    max-height: 0;
    padding: 0;
}

/* Conteúdo do Toast */
.toast-content {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.toast-close:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.05);
}

/* Barra de Progresso */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transition: width linear;
}

/* Tipos de Toast */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-error .toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-warning .toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-info .toast-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Animações */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .toast-container {
        max-width: calc(100% - 2rem);
        left: 1rem !important;
        right: 1rem !important;
    }

    .toast-item {
        min-width: auto;
        max-width: 100%;
    }
}

/* Acessibilidade */
.toast-item[aria-live="assertive"] {
    /* Garante que leitores de tela anunciem imediatamente */
}

/* Modo Escuro (futuro) */
@media (prefers-color-scheme: dark) {
    .toast-item {
        background: #1f2937;
        color: #f9fafb;
    }

    .toast-message {
        color: #f9fafb;
    }

    .toast-close {
        color: #9ca3af;
    }

    .toast-close:hover {
        color: #f9fafb;
        background: rgba(255, 255, 255, 0.1);
    }
}

