/**
 * Sistema de Toast Global
 * Adaptado do padrão do GJ Finance Hub para portfólio estático
 */

.global-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none;
    overflow: visible;
    max-height: none;
}

.toast {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    position: relative;
    border-left: 4px solid;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666666;
    font-size: 16px;
    flex-shrink: 0;
    transition: color 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    color: #333333;
    background: rgba(0, 0, 0, 0.05);
}

.toast-close:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Tipos de toast */
.toast-success {
    border-left-color: #28a745;
    background-color: #f0f9f4;
}

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

.toast-error {
    border-left-color: #dc3545;
    background-color: #fff5f5;
}

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

.toast-warning {
    border-left-color: #ffc107;
    background-color: #fffbf0;
}

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

.toast-info {
    border-left-color: #17a2b8;
    background-color: #f0f9fb;
}

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

/* Responsividade */
@media screen and (max-width: 768px) {
    .global-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }

    .toast {
        padding: 12px;
    }

    .toast-message {
        font-size: 13px;
    }
}

/* Dark mode (opcional, pode ser expandido) */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d2d2d;
        color: #ffffff;
    }

    .toast-message {
        color: #e0e0e0;
    }

    .toast-close {
        color: #999999;
    }

    .toast-close:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }

    .toast-success {
        background-color: #1a3d2e;
    }

    .toast-error {
        background-color: #3d1a1a;
    }

    .toast-warning {
        background-color: #3d2e1a;
    }

    .toast-info {
        background-color: #1a2d3d;
    }
}

