:root {
    --toast-bg: rgba(255, 255, 255, 0.95);
    --toast-border: rgba(0, 0, 0, 0.1);
    --toast-shadow: rgba(0, 0, 0, 0.1);
    --toast-success: #4caf50;
    --toast-warning: #ff9800;
    --toast-error: #f44336;
    --toast-info: #2196f3;
}

.toast-container {
    position: fixed;
    z-index: 9999;
    top: 1rem;
    right: 1rem;
    max-width: 350px;
}

.toast {
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--toast-shadow);
    margin-bottom: 1rem;
    padding: 1rem;
    animation: slideIn 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.toast-message {
    font-size: 0.9375rem;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.toast-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.toast-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #f0f0f0;
    color: #333;
}

.toast-button:hover {
    background-color: #e0e0e0;
}

.toast-button.primary {
    background-color: #007bff;
    color: white;
}

.toast-button.primary:hover {
    background-color: #0056b3;
}

.toast.success .toast-icon {
    color: var(--toast-success);
}

.toast.warning .toast-icon {
    color: var(--toast-warning);
}

.toast.error .toast-icon {
    color: var(--toast-error);
}

.toast.info .toast-icon {
    color: var(--toast-info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Estilos para modo oscuro */
@media (prefers-color-scheme: dark) {
    :root {
        --toast-bg: rgba(33, 33, 33, 0.95);
        --toast-border: rgba(255, 255, 255, 0.1);
    }

    .toast-message {
        color: #fff;
    }

    .toast-button {
        background-color: #424242;
        color: #fff;
    }

    .toast-button:hover {
        background-color: #616161;
    }
}